I wonder how meaningless would be a get*Computed*Style for a node not in DOM
neither rendered yet ... it's not clear in any case which browser does what.



On Fri, Oct 23, 2009 at 11:58 AM, DBJDBJ <dbj...@gmail.com> wrote:

>
>
> CHROME 4.0.223.9
>
> If one does this :
>        var dumsy = $("<div style='display:none;'></div>").css
> ("color", "red");
>        C =  window.getComputedStyle(dumsy[0], null).getPropertyValue
> ("color");
>
> C will be empty string , aka "".  Also observing
> window.getComputedStyle(dumsy[0], null).cssText will reveal that
> "color:" has no value , as everything else in that long string.
> Then if one does this :
>
>        var dumsy = $("<div style='display:none;'></div>").css
> ("color", "red");
>        dumsy.appendTo(document.body);
>        C = window.getComputedStyle(dumsy[0], null).getPropertyValue
> ("color");
>
> C will be "rgb(255,0,0)" as it should ...
> Chrome or JQuery or me , whose fault is this ?
>
> Ah, yes, this works in FireFox (even) without :  dumsy.appendTo
> (document.body);
>
> --DBJ
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"jQuery Development" group.
To post to this group, send email to jquery-dev@googlegroups.com
To unsubscribe from this group, send email to 
jquery-dev+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to