jQuery BannerRotator works on one page but not another

I’m hoping someone can help.

I have a banner rotator which works fine on one page, but not another. I’ve just copy & pasted the code from one page to another, and changed the paths so that they are pointing to the right location. I’ve checked that everything is the same, and I’ve used the W3 broken link checker and the links are all fine. However, the rotator will only play on one page: http://www.electrickiwi.co.uk/test/bannerRotator/index.html.

Read More

I want it to work on http://www.electrickiwi.co.uk but just can’t seem to get it to work.

Does anyone have any ideas as to what could be wrong?

Thanks!

Ross

Related posts

Leave a Reply

3 comments

  1. The page that doesn’t work has a JS error related to an undefined method “draggable”, which will obviously cause other JS to not work. Is it possible that you’ve forgotten to add an expected JS library?

  2. The way jQuery extensions like jQueryUI work is to add to the jQuery object $ in memory as the script is loaded.

    If you reload another copy of jQuery.js it will initialise itself and overwrite the jQuery object $ in memory.

    I see that you have jquery.js and jquery.min.js on that page, if the page loads jquery.js or jquery.min.js after, jquery-ui-1.8.16.custom.min.js, the latest copy of the jQuery object $ in memory will not have the draggable function on it, causing the JavaScript error in the console.

    Confirm the order in which the scripts are loading.