我不会在我的主题中使用 yith ajax 导航
当我使用它时,一切都很完美,但是当单击一个元素进行过滤时,之后我的 jquery 代码停止工作。
在 yith 网站上他们说:
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
但是我应该在哪里使用这个触发器?我在我的 jquery 代码中编写了它们,但它不起作用
最佳答案
这很容易!只需在您的主题中插入那段 jquery 代码即可:
$(document).on("yith-wcan-ajax-filtered",function(){
// your custom js code here
});
关于javascript - 使用 YITH ajax 导航进行过滤后,我的 jquery 代码无法正常工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27129927/