// Событие когда элемент получил фокус
$('#text').focus(function(){
alert('Фокус установлен');
});
// Когда элемент теряет фокус
$('#text').blur(function(){
alert('Фокус снят');
});
async: false,
function showMyCart(){
$.ajax({
async: true,
type: "POST",
url: url_serv+"cart.php",
dataType: "text",
data:{
'action': 'show',
},
error:function(){
$('#view-cart').html('Ошибка');
},
beforeSend: function() {
$('#view-cart').html('Загрузка');
},
success: function (result) {
$('#view-cart').html(result);
$('#view-cart').removeClass('load--after');
}
});
}
$('.price_min_max_btn').on('click',function() {
const
min = $('.price_min').val(),
max = $('.price_max').val();
$('.item_block_filter').each(function() {
hidden_true = $(this).is(":hidden");
const price = +this.dataset.price;
$(this).toggle((!min && !hidden_true || min <= price && !hidden_true) && (!max && !hidden_true || price <= max && !hidden_true));
});
});