当前位置: 动力学知识库 > 问答 > 编程问答 >

jQuery conflict MooTools in Joomla

问题描述:

I want to add a jQuery slider to my Joomla website but the slider is not working. After some time, I found the issue: jQuery and MooTools conflict. I googled the issue but I can't fix it.

jQuery Script:

<script>

jQuery.noConflict();

</script>

<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>

<script src="js/jquery.flexslider-min.js"></script>

I have placed this script at the end of the body tag. Can anyone help me? Thanks.

网友答案:

Put the jQuery.noConflict() after you include the jquery.min.js, otherwise jQuery is not defined.

I'm not familiar with flexslider, but if it is a well-behaved plugin it will work after .noConflict().

(Without seeing more of your code I can't guess whether there are other problems.)

网友答案:

Pu the script in the head tag and inside js\jquery.flexslider-min.js put $.noConflict() and inside the (function() put $ inside the parentheses.

P.S. Please post the contents of jquery.flexslider-min.js

分享给朋友:
您可能感兴趣的文章:
随机阅读: