*

omilias

  • ***
  • 33 posts
Sub Category Pop Up
« on: February 04, 2017, 12:24:20 PM »
Hi,

I read the forum and found this code if you want to to dis-able subcategory pop up on the home page.

// FANCYBOX - SUBCATEGORY OPEN ON HOMEPAGE
  $(document).on('click', '.open-home-cat', function(e){
    e.preventDefault();

    if (!!$.prototype.fancybox) {
      $.fancybox({
        'padding':  0,
        'width':    640,
        'height':   320,
        'autoSize': false,
        'autoDimensions': false,
        'wrapCSS':  'home-cat',
        'content':  '<div class="cat-tab">' + $('#ct' + $(this).attr('rel')).html() + '</div>'
      });
    }
  });


I have more that 42 sub-categories in the JOB section for example and hence don't want the pop-up to appear. I want if a category is selected e.g JOBS is should take me straight to the sub-categories and not pop-up first then sub-categories.

I have commented the code above but when you do that main categories become dis-functional and don't take me to sub-categories when you click them, actually then don't take you anyway it's as if the links are disable.

How can i achieve what i want? should i delete it the code all together?

*

MB Themes

Re: Sub Category Pop Up
« Reply #1 on: February 04, 2017, 03:37:45 PM »
@omilias
You would need to hardcode this for your category, you can find on forums how to not show window if you have 0 subcategories, you can modify it to not show window if you have more than 40 subcategories.
I am pretty sure you will find it.
  To get fast support, we need following details: Detail description, URL to reproduce problem, Screenshots