Help with Filtering.
-
Hello,
I am trying to build a filter. I am having issues getting the ajax request to work. I checked the demo on your website and if I inspect the page (chrome tools) I see the ajax request every time I click on the filter. However, on my page, the filter triggers, but no ajax request is sent. The content fades out, but no new content fades-in.
Are there any other settings that I am missing?
Do I need to pass every argument used in the initial query? Or just arguments that I want to update?My Setup:
Initial query:
echo do_shortcode('[ajax_load_more preloaded="true" preloaded_amount="' . $content['maximum_number_of_items_to_display'] . '" post_type="article" repeater="template_1" posts_per_page="6" pause="true"]');
Link to filter:
echo '<a href="#" data-post-type="post" class="test">Show post</a>';
JS:
$(".test").on("click",function(e){ e.preventDefault(); var data = $(".test").data(), // Get data values from selected menu item transition = 'fade', // 'slide' | 'fade' | null speed = '300'; //in milliseconds $.fn.almFilter(transition, speed, data); $.fn.almFilterComplete = function(){ console.log('done'); }; });
I even see the “done” in the console. So it looks like the functions are called correctly, but not ajax request is sent. I also see no errors.
- The topic ‘Help with Filtering.’ is closed to new replies.