javascript - Why jquery returns invalid property value? -
i have next row in html:
... <div class="jp-container jspscrollable" id="scrollbary" style="height: 274px; overflow: hidden; padding: 0px;" tabindex="0"> ...
in browser console write following:
$('.jp-container.jspscrollable').height()
result:
410
but expected result 274.
in browser console write following:
$('.jp-container.jspscrollable')
result:
... <div class="jp-container jspscrollable" id="scrollbary" style="height: 274px; overflow: hidden; padding: 0px;" tabindex="0"> ...
how 274 in browser console?
updatedebugger shows next values similar situation:
at situation want 105.
i have found next css:
#scrollbary, #scrollbary1 { height: auto; min-height: 410px; clear: both; overflow: hidden }
try this:
var elem = document.getelementbyid('scrollbary') alert(elem.style.height.slice(0, -2));
fiddle javascript jquery html css
No comments:
Post a Comment