Why is it that jQuery returns short hand CSS when I try the following:
alert($('#t1').attr('style'));
On this html:
<div id="t1" style="border-style: solid; border-width: 10px; border-color: red; height: 100px; width: 100px;">Hello</div>
It returns:
border: 10px solid red; height: 100px; width: 100px;
This happens in firefox. Not in chrome.
How can I get the contents of the style attribute exactly as it appears?
Here is a complete test.
Just for clarification purposes, the conclusion is what has been suggested already – this is a browser interpretation and not a jQuery interpretation. So I’ve upgraded to FF 7.0 and it seems to work for me.