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