looking at the snippet. If you want to use jQuery css method change class LabelHeader both IE and FF, you only use each mehtod + css(name,value).
$("document").ready(function() { var cssObj = { 'width': '500px', 'height': '460px' } var cssLabelHeader = { 'position': 'static', 'margin': '0px', 'padding': '3px 0px 3px 0px', 'width': '460px', 'left': ' ' } //if (!$.browser.msie) { $("div#ealertScroll").css(cssObj); //$("div#ealertScroll").width(500); //$("div#ealertScroll").height(460); //$("div.ucLabelHeader").css(cssLabelHeader); // ONLY WORK AT FF $("div.ucLabelHeader").each(function(i) { alert(i); //$(this).css(cssLabelHeader); // ONLY WORK AT FF $(this).css('position' , 'static'); // Both IE and FF $(this).css('width' , '460px'); // Both IE and FF }); } }); 1 2 3 4views:
183answers:
1
Q:
jQuery1.3.2 change multiple same name class only use css(name, value) method. don't use css(name)
A:
$("div.ucLabelHeader").each(function(i) { alert(i); //$(this).css(cssLabelHeader); // ONLY WORK AT FF $(this).css('position' , 'static'); // Both IE and FF $(this).css('width' , '460px'); // Both IE and FF });
ig4
2009-11-19 00:49:31