var count = 0;
function send() {
count++;
$.ajax({
url: '...',
data: data,
dataType : 'html',
type: 'POST',
error: function(){ },
beforeSend: function(){ },
complete: function(){ },
success: function (data, textStatus) {
if(data == 'good'){
//получили желаемый ответ
}else{
if(count <= 10)
send(); //снова отправляем запрос если их меньше 10
else
alert('превышено кол-во запросов!');
}
},
});
}
send();
foreach ($modifications->find('tbody tr') as $k => $size) {
...
}
foreach ($modifications->find('tbody tr') as $k => $size) {
$span = $size->find('.data-rim span')[0];
print_r($span->attr['data-rim']);
}
if (window.matchMedia('(max-width: 767px)').matches) {
$(".header-top").append($('.logo'));
} else {
$(".header-main").append($('.logo'));
}
$(window).resize(function(){
if (window.matchMedia('(max-width: 350px)').matches) {
document.body.style.display = “none”;
} else {
document.body.style.display = “block”;
}
}
$(window).resize(function(){
var width = ...
if(width < 350) {
document.body.style.display = “none”
}
}