Portfolio Filter Default

3 replies · opened Jul 8, 2019

CCoSurvivorJul 8, 2019

On the portfolio page:

The default filter is set to ‘show all’ when the page is opened. Can the default tab a different filter?
For example: in my gallery I’d like to show 'New Images' only instead of 'show all' when the page first loads.

I found a topic in the forum on this and followed all the instructions.
http://support.semicolonweb.com/forums/topic/portfolio-jquery-filter/

On my page, the list of portfolio filters:


- [Show All](#)

- [Newly Added](#)

- [Ladakh](#)

- [Spiti Valley](#)

- [Himachal](#)

- [Uttarakhand](#)

- [Golden Hours](#)

- [Expressions](#)

- [Up Close](#)

- [Wildlife](#)

and i've added the JS code at the bottom as follows:

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

it doesnt work!

can you please have a look at this link and tell me what i'm missing, would be a big help if i could sort this out.
http://www.cosurvivor.in/newsite/pages/galleries.html

Thank you

CCoSurvivorJul 8, 2019

Repasting the code lines:


	
- [Show All](#)
	
- [Newly Added](#)
	
- [Ladakh](#)
	
- [Spiti Valley](#)
	
- [Himachal](#)
	
- [Uttarakhand](#)
	
- [Golden Hours](#)
	
- [Expressions](#)
	
- [Up Close](#)
	
- [Wildlife](#)

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

Hello,

This feature is already built-in within Canvas. Simply consider using the following code:

This will definitely work fine. Hope this Helps!

Let us know if we can help you with anything else or if you find any further issues.

CCoSurvivorJul 9, 2019

This...just made my day.
It worked, and I can now make my gallery page exactly how i wanted.

Thank you so much! :)

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