Filtering x Instances on Page with x+y Instances
-
I have a follow up question to my support request you answered a few days ago.
Now, I want to use the same filter parameters across two filters on a page with other alm instances that should not be filtered.
My thought was to run the filter twice, changing the ID. I tried this js, but it’s adding the same results twice to the second instance:
function filterAlm() { var toBeFiltered = $('.ajax-filtered'); if( toBeFiltered.length === 0 ) { return true; } var data = new Object(); data.taxonomy = []; data.taxonomyOperator = []; data.taxonomyTerms = []; $('.filter-group.has-selected').each( function() { $this = $(this); data.taxonomy.push($this.data('filter-tax')); data.taxonomyOperator.push('IN'); var taxTerms = []; var activeFilters = $this.find('.dropdown-pane li.selected'); $.each(activeFilters, function() { taxTerms.push($(this).data('tax-term')); }); data.taxonomyTerms.push(taxTerms.join(', ')); // console.log($this.data('filter-tax')); }); var filterData = new Object(); filterData.taxonomy = data.taxonomy.join(':'); filterData.taxonomyOperator = data.taxonomyOperator.join(':'); filterData.taxonomyTerms = data.taxonomyTerms.join(':'); var transition = 'fade'; var speed = '300'; // console.log(filterData); $.each(toBeFiltered, function() { var ajaxID = $(this).parents('.ajax-load-more-wrap').data('id'); console.log(ajaxID); filterData.target = ajaxID; $.fn.almFilter(transition, speed, filterData); }); }
Thoughts?
The page I need help with: [log in to see the link]
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Filtering x Instances on Page with x+y Instances’ is closed to new replies.