• jQuery(document).ready(function() {
        jQuery('.tax-arrow').click(function() {
        	
        	if( jQuery(this).closest('.taxonomy-list-item').hasClass('active') ) {
        		jQuery(this).closest('.taxonomy-list-item').find('.tax-child-list-item').fadeOut();
        		jQuery(this).closest('.taxonomy-list-item').find('div.tax-arrow').addClass('rotate');
        		jQuery(this).closest('.taxonomy-list-item').find('div.tax-arrow').removeClass('rotate');
        		jQuery(this).closest('.taxonomy-list-item').removeClass('active');
        	} else {
        		jQuery(this).closest('.taxonomy-list-item').find('.tax-child-list-item').fadeIn();
        		jQuery(this).closest('.taxonomy-list-item').find('div.tax-arrow').removeClass('rotate');
        		jQuery(this).closest('.taxonomy-list-item').find('div.tax-arrow').addClass('rotate');
        		jQuery(this).closest('.taxonomy-list-item').addClass('active');
            }
    	});
    	
    	jQuery("#tax-search-filter").on("keyup", function() {
    		var value = jQuery(this).val().toLowerCase();
    		if( value != '' ) {
    			jQuery('.<strong>taxonomy-list-item</strong>').hide()
    			.filter('[data-taxname*="'+value+'"]')
    			.show(); // show the filtered elements
    		} else {
    			jQuery('.taxonomy-list-item').show();
    		}
    	});
    });
    <div class="taxonomy-search-filter">
                    <input type="text" placeholder="Search..." id="tax-search-filter"/>
     </div>
    • This topic was modified 2 years, 4 months ago by pcnet.
Viewing 1 replies (of 1 total)
  • It might sound silly to you but where do we put these codes? I’m a learner. Can you tell me, please? I would like to add a search bar on top of this plugin. Thank you

    • This reply was modified 2 years, 2 months ago by turansaim.
Viewing 1 replies (of 1 total)
  • The topic ‘Suggestion: adding a search option on the page’ is closed to new replies.