JQuery - Failing to initialise on FF/Opera

Soldato
Joined
3 Jun 2005
Posts
3,332
Location
The South
I'm adding a JQuery slideshow (Slideshow Lite to be exact) to a site, the issue i'm having is that on my development site (linux box) it works fine in most major browsers (issue in Safari). But on the clients host (council ran Windows IIS box, completely different host) it fails in Opera and Firefox (the slideshow works in other browsers like IE, Safari, Chrome).

I've literally tried everything i can thinking of, even tried replacing the slideshow with another one (Showcase 2.0) which works fine in IE but not Firefox or Opera.
However it will work if i re-call the JQuery library just before the slideshow library. This throws errors in IE but i can bodge (this is a serious bodge job of it, certainly isn't a solution to this) it using an IE conditional -
Code:
ie - 
<!--[if !IE]>--><script type="text/javascript" src="/js/jquery-1.3.2.min.js"></script><!--<![endif]-->
So i'm assuming it's an issue with the JQuery library not initialising but what i don't understand is that it works fine on my dev site which is the same code.

Has anyone got ideas as this has completely stumped me?

For reference -

In Internet Explorer (Works)


In Firefox (Broken)


Client Site - http://www.fairfield.beds.sch.uk/
My Dev Site - http://fairfields.listen-to.me.uk/

*Yes i know the code is extremely nasty, but i wasn't the original dev and i haven't been brought in to do a complete overhaul.....

** Have tested in IE6-8/Safari 3 & 4/Chrome 3 and it works. Broken in FF2/3/3.6 and Opera 10

Edit - Just noticed that this seems to be affecting all JQuery on the site (like lightbox), not just the slideshow.
 
The problem is caused by line 15 of stuHover.js; under Firefox and Opera, StyleSheet does not contain a definition for the rules property. The reason it's working on your dev box is that the script location in the markup just leads to a 404, so the script isn't executed and no error occurs.

For the record, Firebug is fantastic for picking up errors like this.
 
Life saver! Ended up removing the JS script and touch wood everything seems to work correctly. :D
Good shout on the FF add-on, never heard of it before but it's certainly useful!
 
Back
Top Bottom