jQuery에서 부모에 대한 상위 위치를 숫자로 얻을 수 있지만 .NET에 설정된 경우 css 상위 값을 숫자로 가져올 수 없습니다 px.
다음이 있다고 가정합니다.
#elem{
position:relative;
top:10px;
}
<div>
Bla text bla this takes op vertical space....
<div id='elem'>bla</div>
</div>
$('#elem').position().top; //Returns the number (10+(the vertical space took by the text))
$('#elem').css('top'); //Returns the string '10px'
하지만 css top 속성을 숫자로 갖고 싶습니다 10.
어떻게 이것을 달성 할 수 있습니까?