$(document).on('keyup', '.input', function(){
var $this = $(this);
var $delay = 450;
var search_data = $this.val();
clearTimeout($this.data('timer'));
$this.data('timer', setTimeout(function(){
if(search_data.length > 1) {
$.ajax({
type: 'POST',
url: '/core/action/path.php',
data: {
//data
},
success: (data) => {
//result
}
});
}
}, $delay));
});$('.search').on('keyup', function() {
var $this = $(this);
var $delay = 500;
clearTimeout($this.data('timer'));
$this.data('timer', setTimeout(function(){
console.log('test n-125');
// ...code
}, $delay));
});text-decoration нет.ll2 li:hover {
text-decoration: underline;
text-decoration-color: red;
}{% if count is not empty and count >= 0 %}let fruits = ['фрукты','бананы','тостер'];
$('#div').html(fruits);.html()нужно заменить на .append()$('#div').append(fruit) и вынести внутрь циклаlet fruits = ['фрукты','бананы','тостер'];
for (let fruit of fruits) {
$('#div').append(fruit);
} $(this).addClass("active").closest('.current-menu-item').addClass('active');var thisCard = $(this) на var thisCard = $('.card'); !$(target).is('nav') && !$(target).parents().is('nav')<nav>onChangeonChange, передаешь туда агрумент, проверяешь и выводишь onChange #add-deal и на .img-clear который создается внутри.... closestвместо parent$('.body').on('click', '.your_element', function() {
function getval(sel)
{
let city = sel.value;
let data = {
city_id : city
};
$.ajax({
type: "POST",
url: `city.php?city=${city}`,
data: data,
success: function(html){
$("#pz").load(`city.php?city=${city}`);
}
});
};function getval(sel)
{
let city = sel.value;
let data = {
city: city
};
$.ajax({
type: "GET",
url: 'city.php',
data: data,
success: function(html){
$("#pz").load(`city.php?city=${city}`);
}
});
};