diff --git a/addons/default/visiosoft/advs-module/resources/js/cats.js b/addons/default/visiosoft/advs-module/resources/js/cats.js index 0879d9127..ba40a71b2 100644 --- a/addons/default/visiosoft/advs-module/resources/js/cats.js +++ b/addons/default/visiosoft/advs-module/resources/js/cats.js @@ -60,13 +60,15 @@ $(document).ready(function () { $('.cat-item-3').parent().css('display', 'flex'); stop(); } else { - response.forEach(function(options){ - $(catId).append("
  • "+options.name+"
  • "); - }); - $('.focus-select').removeClass('focus-select'); - // $(catId).animate({height: '14rem'}, 200); - $(catId).css({height: '14rem'}); - $(catId).closest('.cat-item-2').show().addClass('focus-select') + if (!$('li', catId).length) { + response.forEach(function(options){ + $(catId).append("
  • "+options.name+"
  • "); + }); + $('.focus-select').removeClass('focus-select'); + // $(catId).animate({height: '14rem'}, 200); + $(catId).css({height: '14rem'}); + $(catId).closest('.cat-item-2').show().addClass('focus-select') + } } // Auto scroll right let categoryTab = $('.category-tab');