portfolio jquery filter

3 replies · opened Jun 3, 2016

TthestroneJun 3, 2016

Hi
The default filter is set to 'show all' when the page is opened. Is there any way to make the default tab a different filter. For example: I'd like to show a 'Best Sellers' list on opening the page.

I tried moving class="activeFilter" into a different <li> tag. But that enables the highlighting around the word on opening without activating the filter.

Any suggestions would be greatly appreciated.

FfotobobJun 4, 2016

Just logged in and did a search to discover/ask exactly the same thing.

SSemicolon WebSTAFFJun 5, 2016

Hello,

You can simply add the following JS code at the bottom of the Page just after the js/functions.js Linking:


    jQuery(window).load( function(){
        jQuery('#portfolio-filter li').removeClass('activeFilter');
        jQuery('#portfolio-filter li').find('[data-filter=".pf-filter"]').parent('li').addClass('activeFilter');
        jQuery('#portfolio').isotope({ filter: '.pf-filter' });
    });

Make sure that you replace all the occurrences of .pf-filter in the above code with the Filter Class you want to activate by default.

This will definitely work fine. Let us know if we can help you with anything else or if you find any further issues.

FfotobobJun 6, 2016

Many thanks, works just fine.

Have the same question, or something new?

Sign in to the Canvas dashboard to reply or open your own topic. Canvas owners get direct help from the SemiColonWeb team.

Reply on the dashboard