javascript - jQuery: How to get the style attribute for "position" of an element? -
this question has answer here:
- get css value javascript 8 answers
what proper mark-up in jquery (or javascript) style attribute "position" element in dom?
example:
html
<div id="parent"> parent element <ul class="child"> <li> <p>inner child elements</p> </li> </ul> </div>
css
#parent { position: relative; } .child { position: absolute; }
javascript:
$(function() { // type here "style attribute position" of #parent? })
$('#someelementid').css('position');
Comments
Post a Comment