views:

24

answers:

3

On my page http://all-fours.pl/ I'm using moo.fx for.. something, I don't really know what. And now I was trying to add a jquery banner rotator. But still regarding fact that I'm setting my banner script in jQuery.noConflict(), the moo.fx library gives errors :

function to set the jquery cycle plugin:

<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function(){
    jQuery('.banner').cycle({
        effect: 'fade'
    });
});
</script>

Now my firebug states, that "$ is not a function" in some moo.fx script. How to resolve this ?

A: 

Solved by including jquery at the bottom of my scripts list.

tom_pl
So give credit to Nick.
Iznogood
+2  A: 

In case anyone finds this later .noConflict() is intended to restore $ to it's previous value, if you include jQuery first that previous value is undefined. You'll need to include jQuery after what you want to restore it to in order for it to work.

The jQuery.noConflict() documentation has more details.

Nick Craver
A: 

Try adding the $ inside the function parameters:

<script type="text/javascript">
jQuery.noConflict();
jQuery(document).ready(function($){
    $('.banner').cycle({
        effect: 'fade'
    });
});
</script>
fudgey