$('#element').css(“CssProperty”) is not loading

[a]

New Member
i am using jquery .css() function to get 'margin-left' property using \[code\]var divMargin= $('#DivId').css('margin-left')\[/code\] but i am getting \[code\]undefined\[/code\] in \[code\]divMargin\[/code\] some times this works perfectly and some times causes problem \[code\]var divMargin= $('#DivId').css('margin-left'); \[/code\]what is cause of such unexpected behavior?
 
Top