IE7 and Javascript

IE7 is choking on some js effects that work fine in IE8 and 9.

The problems:

  1. The links at the top should have an animated bg on mouseover/
    mouseout.
  2. An element should slide in from the right side of the window 1.6s
    after page load.
  3. The network links in the footer should have an animated width on
    mouseover/mouseout.

http://www.xiiro.com/test

Todd

Here’s the js:

$(document).ready(function() {

// Index

	$('#client').css({
		marginLeft: 460,
	});
	$('#client').delay(1600).animate({marginLeft:'20'},'slow');

// Nav Bottom Right/Upper Left Slide

	$('ul.nav li a').css({
		backgroundPosition: '0 0',
		})
		.mouseover(function(){
			$(this).stop().animate(
				{backgroundPosition: "(-200px -100px)"},
				{duration: 500
			})
		})
		.mouseout(function(){
			$(this).stop().animate(
				{backgroundPosition: "(0 0)"},
				{duration: 2400
			})
	});

//Network

	$('#linkedin a').mouseover(function() {
		$('#linkedin').animate({
			width: 35,
			}, 600, function() {
		});
	});
	$('#linkedin a').mouseout(function() {
  		$('#linkedin').animate({
     		width: 150,
  			}, 300, function() {
		});
	});

	$('#tweet a').mouseover(function() {
		$('#tweet').animate({
			width: 35,
			}, 600, function() {
		});
	});
	$('#tweet a').mouseout(function() {
  		$('#tweet').animate({
     		width: 150,
  			}, 300, function() {
		});
	});
});

dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options

I’m not all that familiar with jQuery, but one line stood out at me:

	marginLeft: 460,

IE doesn’t deal well with trailing commas at all. Frankly, I’m
surprised that IE8 could tolerate this. Maybe there was another value
in the method signature earlier, and you removed it?

Walter

On Apr 15, 2011, at 1:22 PM, Todd wrote:

IE7 is choking on some js effects that work fine in IE8 and 9.


dynamo mailing list
email@hidden
Update your subscriptions at:
http://freewaytalk.net/person/options