Before you ask please READ THIS

Closing filter list when pressing 'All'

edited June 2013 in Hypershot Posts: 38
Hello Air,

long time I haven't annoyed you ;)

I was wondering if it could be easy that the genre filter list close/retract on albums page when choosing 'All', I mean exactly as if it was a click on 'filter by'. I guess it is but i would like the architects validation :)

Thanks a lot for attention.
Have a nice day !
Post edited by Paul on

Comments

  • AirAir
    Posts: 10,970
    Hello Paul:-)

    It is not that hard.
    Install this plugin http://wordpress.org/plugins/custom-javascript-editor/ and in Appearance ->Custom JavaScript drop this code
    
    jQuery(document).ready(function(){
    
        var _switch = jQuery('#albums-filter'),
            label = _switch.find('li.label');
    
    	if(_switch.length){
            _switch.find('li[data-filter="__all"]').click(function(){ label.click(); });
    	}
        
    });
    
    
    With regards.
  • Posts: 38
    Hello Air,

    thanks a lot for the quick solid patch !

    Have a nice day (and easy questions)
  • AirAir
    Posts: 10,970
    :D
    Thanks a lot!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion