views:

183

answers:

1

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 4
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