fix double category click

This commit is contained in:
Diatrex 2021-02-01 15:43:00 +03:00
parent bc6fc0c08a
commit ea91e6f059

View File

@ -60,13 +60,15 @@ $(document).ready(function () {
$('.cat-item-3').parent().css('display', 'flex'); $('.cat-item-3').parent().css('display', 'flex');
stop(); stop();
} else { } else {
response.forEach(function(options){ if (!$('li', catId).length) {
$(catId).append("<li class='text-truncate pl-1 my-1' data-value="+options.id+">"+options.name+"</li>"); response.forEach(function(options){
}); $(catId).append("<li class='text-truncate pl-1 my-1' data-value="+options.id+">"+options.name+"</li>");
$('.focus-select').removeClass('focus-select'); });
// $(catId).animate({height: '14rem'}, 200); $('.focus-select').removeClass('focus-select');
$(catId).css({height: '14rem'}); // $(catId).animate({height: '14rem'}, 200);
$(catId).closest('.cat-item-2').show().addClass('focus-select') $(catId).css({height: '14rem'});
$(catId).closest('.cat-item-2').show().addClass('focus-select')
}
} }
// Auto scroll right // Auto scroll right
let categoryTab = $('.category-tab'); let categoryTab = $('.category-tab');