...

View Full Version : Resolved Please, help - IE problem: jQuery, each(), attributes



alexeizuzin
05-08-2009, 04:00 PM
IE (6,7) breaks all javascript if see this code:


$(".something").each( function() {
var x= $(this).attr('ImgHeight') - 100;
$(this).height(x);
});

But this works:


$(".something").each( function() {
var x= $(this).attr('ImgHeight');
$(this).height(x);
});

And this works:


$(".something").each( function() {
var x= $(this).attr('ImgHeight') -100;
$(this).after(x);
});

html:
<span class="something" ImgHeight="280">...</span>

(sorry, i can't change title)



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum