For a site I’m building, I import my Jquery code from…
http://jqueryjs.googlecode.com/files/jquery-1.3.2.js
…but when I run the site in IE, it gives me various instances of “argument not valid” on line 4031.
This happens when I hover above a field which should be animated on trough Jquery. Here is the JS code I wrote…
$('body ul li').each(
function(){
var tamcompleto = $(this).css('height');
$(this).hover(
function(){
$(this).stop().animate({height:tamcompleto},{queue:false, duration:600, easing: 'easeOutBounce'});
},
function(){
$(this).stop().animate({height:'50px'},{queue:false, duration:600, easing: 'easeOutBounce'});
}
);
$(this).css('height','50px');
}
);
Is this a case of incompatibility? Or is my code wrong?
Also, I’ve tried height:'auto' instead of height:'tamcompleto' on the hover function, but it doesn’t work, Isn’t height:'auto' supposed to be the right way to do it?
If the element doesn’t have a height specified,
css('height')won’t return anything. You can use theheightfunction instead, which gives you the actual height in pixels: