PDA

View Full Version : IE8 gives 'nodeName' is null or not an object but works on FF, Chrome, IE9, etc



englishnerdbookworm
05-23-2011, 11:03 PM
1) Script Title: Ultimate Fade-in slideshow v2.4

2) Script URL (on DD): dynamicdrive.com/dynamicindex14/fadeinslideshow.htm

3) Describe problem:

The demo on the page does work on IE8.

I am trying to create a simple fade in slideshow as the background image for a club website:

http://missyj.net/brunossf/index.php

I haven't tried earlier versions of IE, but I know that IE8 gives me this error, and IE9 does not. I've also tested this on the iPhone, Chrome, FF, Safari, Chrome and FF on Mac, and it all works. And on IE9.

The exact error said:
'nodeName' is null or not an object
fadeslideshow.js
Code:0
URI: http://missyj.net/brunossf/js/fadeslideshow.js

Lines: 59
Char: 3

I think this is the line in question:
var $curimage=setting.$gallerylayers.html(fullhtml).find('img').hide().eq(setting.curimage) //prefill both layers with entire slideshow content, hide all images, and return current image

As a temporary workaround, I've made the first image of the slideshow the loading image, and commented out the code that centers the loading image, so that on IE8 at least, it looks like just a static image instead of the loading GIF. On all other browsers, the script works great.

I'm not a jQuery expert, so any help would be appreciated.

jscheuer1
05-24-2011, 03:55 AM
Replace:


<script src="js/jquery-1.2.2.pack.js" type="text/javascript"></script>

with:


<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.min.js"></script>

englishnerdbookworm
05-24-2011, 04:00 AM
Easy and perfect! Thanks