Using jQuery (or just JavaScript), how do I detect the inherited background-color of an element?
For example:
#target has no background color to read because background-color is not inherited.
you could write some javascript that keeps climbing up the DOM tree to search for a background-color declaration until it finds one., but there's no guarantee that that will get you the background color of an element that actually contains your #target.
btw. the css() method gets computed styles, so its giving you the correct reading.