Reset Filter and Multiple Meta Value
-
Hi,
is there a “reset” filter function i mean i have two sort like this:jQuery(document).ready(function($) { // Filter Ajax Load More var alm_is_animating = false; //$('#alm-filter-nav li').eq(0).addClass('active'); // Set the initial button active state // Nav btn click event $('#alm-filter-nav li a').on('click', function(e){ e.preventDefault(); var el = $(this); // Our selected element if(!el.hasClass('active') && !alm_is_animating){ // Check for active and !alm_is_animating alm_is_animating = true; el.parent().addClass('active').siblings('li').removeClass('active'); // Add active state var data = el.data(), // Get data values from selected menu item transition = 'fade', // 'slide' | 'fade' | null speed = '300'; //in milliseconds $.fn.almFilter(transition, speed, data); // reset Ajax Load More (transition, speed, data) } }); $('#alm-filter-nav2 li a').on('click', function(e){ e.preventDefault(); var el = $(this); // Our selected element if(!el.hasClass('active') && !alm_is_animating){ // Check for active and !alm_is_animating alm_is_animating = true; //el.parent().addClass('active').siblings('li').removeClass('active'); // Add active state el.parent().addClass('active'); var data = el.data(), // Get data values from selected menu item transition = 'fade', // 'slide' | 'fade' | null speed = '300'; //in milliseconds $.fn.almFilter(transition, speed, data); // reset Ajax Load More (transition, speed, data) } }); $.fn.almFilterComplete = function(){ alm_is_animating = false; // clear alm_isanimating flag }; });
Actual all works except that second filter is added to the first and viceversa, i need to reset manually like data-tag=”” or is there a “reset” function?
Also, is there a “global” filter var in javascript so i can add multiple meta value filter?
Thanks
F
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Reset Filter and Multiple Meta Value’ is closed to new replies.