简体   繁体   中英

After filter with YITH ajax navigation my jquery codes not working

I ain't to use yith ajax navigation in my theme

When I use it every things are perfect but when click a element to filter, after that my jquery codes stop working.

In yith site they say:

If your product list contains some JavaScript code, once the ajax filters are selected they cannot longer work. In order to fix this issue we have included two triggers you can include in your code:

//trigger ready event
$(document).trigger("ready");
$(document).trigger("yith-wcan-ajax-filtered");

http://yithemes.com/docs-plugins/yith_ajax_navigation

But where i should use this triggers? I wrote them in firs of my jquery code but it doesn't work

that is easy! just insert that piece of jquery code in your theme:

$(document).on("yith-wcan-ajax-filtered",function(){
    // your custom js code here
});

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM