...

View Full Version : Jquery div swap not working in IE



amandamay
09-25-2010, 06:58 PM
I am not a programmer, I am just trying to accomplish some remote rollover div swaps on a website and found this script/instructions. It works great in Firefox, but nothing happens in IE and down at the bottom of the browser window there is a message that the page is not loading correctly. Since the unknown to me is the jquery script, I am assuming the issue is there?

Here is the page in question: http://automationis.wrightarts.com/

- mouse-ing over any menu item is supposed to swap out the main div (the images are the same right now, so only the text in the bottom right corner changes)

Thanks!

SB65
09-26-2010, 09:27 AM
Looks like the problem is the switches variable - this must be a reserved word in IE. Try changing your variable names:

[CODE] $switches = $('#switches > li');
$slides = $('#slides > div');
$switches.each(function(idx) {
$(this).data('slide', $slides.eq(idx));
}).hover(
function() {
$switches.removeClass('active');
$slides.removeClass('active');
$(this).addClass('active');
$(this).data('slide').addClass('active');
});
[/CODE



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum