Multiple JavaScript clashing

hi guys,

im not amazing with javascript and could do with some advice.

anyways ive tried putting two different scripts on my page and they clash. Ive read up about it (http://www.javascriptkit.com/javatutors/multiplejava3.shtml)
and i can understand it, but just can’t apply the solution to my scripts.

ive put my site online at http://www.design-wright.co.uk/nmr/home.html

theres a slide show which is currently working, and a scrolling box at the bottom which is currently dead.

i would love a nudge in the right direction…

thanks for your time.

alsweet

awesome!
thanking you kindly :smiley:

One of your scripts use jQuery.noConflict() which removes $ from the global namespace.

Your news.js script can recreate the $ object by passing jQuery to the function, which will use it as $ inside the function.

Here’s the construct that you would want to use:


 jQuery(function($) {
    ...
})(jQuery);

The jQuery.noConflict() page shows similar example code. In their example code, note that the .ready() snippet is nowdays superseded by [url=“http://api.jquery.com/jQuery/#jQuery3”]jQuery callback