How to get div height value in JavaScript or jQuery?
I need to get a div
's height in JavaScript or jQuery and change it's value in CSS.
How could I do this in jQuery or JavaScrip开发者_如何学Ct?
This should accomplish what you need
var height = $(selector).height();
and you set it like this
$(selector).height(val);
Pretty standard javascript.
var divHeight = document.getElementById("yourDiv").style.height
精彩评论