I am new to JQuery and dynamically appending a value to an h1 element using a span element
<h1>Height: <span class="height"></span></h1>
var height = $(".height").val();
span element doesn't have a "value", form elements do. (
select, etc.) If you're looking to get the text of the
span element, you can do that like so:
var height = $(".height").text();
Note: If there are multiple matching elements, this will concatenate the text of all of them. Observe.