[jQuery] easy/quick css inheritance?
Is there a "jQuery way" to clone/copy the css styling of an element into
another element? In particular, I'd like to copy an elements position,
left, top, margin, and padding values -- must I chain these? Further,
I'd like to apply the styling to a wrapping <div>, e.g.
$(element_CSS_to_clone).wrap("<div style='CLONED CSS'></div>");
possible?
Also, a quick ?: about chainging; are the chains executed procedurally
from left to right? My test (shown below) seems to indicate so.
$('#test').css({width: "100px"});
width = $('#test').css({width: "300px"}).css('width');
alert(width); // outputs "300", demonstrating left->right execution flow
As ever, thanks!
~ Brice
ps -> John, I look forward to 1.0 ;) but don't rush it! Maybe a
"preview" release @ end of month is better placed than "1.0 final"?
/sane looks mighty tasty ATM though...
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/