Link to home
Start Free TrialLog in
Avatar of SvassUK
SvassUK

asked on

Javascript cross browser issues

Hello,

I'm having issues with a Javascript for flipping pictures on my front page of the website.

The site looks fine in Mozilla Firefox but no in IE, Chrome or Opera etc... site is here www.nordisk-solvarme.se

The error code I get in IE:

Message: 'undefined' is null or not an object
Line: 12
Char: 388
Code: 0
URI: http://www.nordisk-solvarme.se/js/jquery.nivo.slider.pack.js
Avatar of Aazmodeus
Aazmodeus
Flag of Russian Federation image

Oh my, the code is compressed.
The error is in the plugin code. It is caused because in some part of the code (which is hard to tell, because the code is completely unreadable when compressed) it tries to get string value from attribute 'title' of some image (var name g.currentImage). The atribute is undefined, but it passes the safety check because it checks only for empty string for some reason.
I suggest you use some other plugin, or write the author of the plugin about the bug. Maybe he/she'll fix it.
...
if(g.currentImage.attr("title")!=""){
   k=g.currentImage.attr("title");
   if(k.substr(0,1)=="#")
      k=a(k).html();
...

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Dave Baldwin
Dave Baldwin
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial