In an attempt to circumvent a MooTool/JQuery conflict with this idea :: http://davidwalsh.name/jquery-mootools
I am under the impression that I have to rewrite the NIVO function. Not being a JS coder, it is not clear to me if I can substitute one function with the other, or if a rewrite is necessary.
This is the format of the call
(function($) {
$('p').css('color','#ff0000');
})(jQuery);
Do I need to rewrite this to avoid conflict with MooTools?
$(window).load(function() {
$('#slider').nivoSlider({
effect:'sliceDown', //Specify sets like: 'fold,fade,sliceDown, or random'
animSpeed:1000, //Slide transition speed
pauseTime:6000,
startSlide:0, //Set starting Slide (0 index)
directionNav:false, //Next & Prev
controlNav:false //1,2,3...
});
});
You can either encapsulate all your jQuery calls in an anonymous function where you pass $ as an argument and finish with (jQuery) as in the above code. This requires all jQuery calls to be inside a function like this. This is the default format for jQuery plugins, by the way.
Or you can put jQuery in no conflict mode like this:
Then you need to make sure none of your jQuery code uses $ since mootools wants that. Instead use jQuery explicitly. So instead of:
you need: