How to obtain non-computed css style?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jezternz
    New Member
    • Jan 2008
    • 145

    How to obtain non-computed css style?

    Hi,

    I would like to obtain the non-computed style property of an element

    examples:

    jquery:
    Code:
    $(element).css("width")
    // will not work, as it will return the computed width (in pixels), when it is set to 'auto' I do not want the width in pixels, I want the actual property (auto).

    Code:
    element.style.width
    // Also not acceptable as this will only retrieve inline properties.


    Any help is hugely appreciated,
    Cheers, Josh
  • acoder
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    Perhaps this will help.

    Comment

    Working...