我使用Ajax WooCommerce过滤器。 当我执行过滤器工作时,以下jQuery代码将停止。 请帮我解决这个问题。 谢谢
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$.noConflict();
jQuery(document).ready(function(){
var a=jQuery('a');
if( a.is("[href$='/red/']")){
jQuery(".jet-woo-products__item.jet-woo-builder-product.jet-woo-thumb-with-effect.col-desk-3").hover(function(){
jQuery(this).attr('style', 'background-color: yellow !important');
},
function(){
jQuery(this).attr('style', 'background-color: transparent !important');
});}
else{
jQuery(".jet-woo-products__item.jet-woo-builder-product.jet-woo-thumb-with-effect.col-desk-3").hover(function(){
jQuery(this).attr('style', 'background-color: blue !important');
},
function(){
jQuery(this).attr('style', 'background-color: transparent !important');
});}
});
</script>