Extending the idea posted by @vadim, I think I can go better. Just a clone() object, and don't put it in the DOM. that way it can't hang!
css_color_without_hover_ = $('.example').clone(false).css('background');
There is no need to do a potentially expensive DOM scan when loading a document!
Anyhoo works well for me.
- EDIT -
I just noticed that there are limitations to this technique (or "gotchas").
If the element for which you are trying to get color data has its own color (or background color) inherited from the parent element, then the cloned object will not match the CSS template, which means that the style will not be applied to the jQuery object.
The workaround in this case is to clone the parent object (to which the corresponding style is applied) and extract its style, and not the child, instead.
source share