0

Is it possible to retrieve all of the CSS rules applied to an element, even if none has been applied (computed style by the browser), e.g.

alert($('#element').css());

Should have feature like this to show every css rule that can output like this:

position: static,
height: auto,
width: auto,
font-size: 100%,
line-height: 1,
z-index: 0
// and so on...

1 Answer 1

0

Here's some info: Get all CSS styles of an element with JavaScript

Unfortunately there's no solid solution, and it looks like there will be a few gotchas. However, for simple debugging it should probably be good enough.

Sign up to request clarification or add additional context in comments.

2 Comments

for simple debugging use firebug (or ie developer toolbar)
Hmmm. Plausible, jQuery should include this imo.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.