我在wordpress上的index.php文件中使用此代码所有功能都正常工作只是这个功能无法正常工作。我已经使用了wp enque脚本所以现在我不知道什么是我需要你帮助的问题....
$(window).load(function () {
$("#flexiselDemo1").flexisel();
$("#flexiselDemo2").flexisel({
enableResponsiveBreakpoints: true,
responsiveBreakpoints: {
portrait: {
changePoint: 480,
visibleItems: 1
},
landscape: {
changePoint: 640,
visibleItems: 2
},
tablet: {
changePoint: 768,
visibleItems: 3
}
}
});
$("#flexiselDemo3").flexisel({
visibleItems: 5,
animationSpeed: 1000,
autoPlay: true,
autoPlaySpeed: 3000,
pauseOnHover: true,
enableResponsiveBreakpoints: true,
responsiveBreakpoints: {
portrait: {
changePoint: 480,
visibleItems: 1
},
landscape: {
changePoint: 640,
visibleItems: 2
},
tablet: {
changePoint: 768,
visibleItems: 3
}
}
});
$("#flexiselDemo4").flexisel({
clone: false
});
});
答案 0 :(得分:0)
jQuery
和Wordpress here, try to convert
$ to
jQuery`之间可能存在冲突或使用:
jQuery(function($) {
// Your code here
});
或将所有当前的jQuery代码包装在一个闭包中:
(function($){
// Your code here
})(jQuery);