Having reported bug #552 ( http://jquery.com/dev/bugs/bug/552/ ), I'm trying
to find a solution.

Does anyone know how to detect whether $().css('backgroundColor') is
returning an inline rule or a proper CSS styling? When it's an inline rule,
the inline color needs to be set back to its original value after the fade
has completed, but when it's an applied rule, the inline value needs to be
removed at the end of the fade so class manipulation, etc. will be
reflected.

I'm considering using $().attr('style').match([COLOR]), but then it would
return true if that color is used for a different style attribute, and if I
include the attribute name, I'll probably have to create a regex to deal
with whitespace, and I've heard that Javascript's runtime regexes are slow.
How would the rest of you do it?

When the element itself has no background color, how do you think the fade
should be handled? I've put up a solution that traverses up the DOM tree to
find an element with background color, but an opacity-based solution may be
better, especially for absolutely-positioned elements.

Also, is there anything I should be doing differently in filing bug reports?
So far as I can tell, no one has noticed any of mine. They're all on the
Interface plugin.
-- 
View this message in context: 
http://www.nabble.com/-ifxhighlight--inline-vs.-applied-style-detection-tf2887796.html#a8067881
Sent from the JQuery mailing list archive at Nabble.com.


_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/

Reply via email to