$("#learning_menu").height()
will return the span's height
Hm. I am not sure wither I’ve got your issue right or not but… From pure javascript you can use clientHeight (or offsetHeight) property of the element to get it’s height in pixels. From jquery just use .height() method (wich is actually a browser-agnostic wrapper around clientHeight property).
Using jQuery: that would be the .height() method.
var span_height = $('#learning_menu').height(),
div_height = $('#aLM').height();
N.B. it is invalid HTML to place a block-level element (in this case the <div>
) inside of an inline element (the <span>
).
Here it is in plain js and no jQuery required:
document.getElementById("learning_menu").offsetHeight;