I am wondering whether there is a way in which I can get the value within a given HTML element using JQuery?
Example
&l
You kind of need a different selector in order to tell jQuery which span element to look at.
$("span").attr("id")
Which would get the Id attr value of all spans on the page.
For example, if you had
you could get the IDs of all the spans with class "mySpanClass" using:
$("span[class='mySpanClass']").attr("id")
Documentation here: http://api.jquery.com/attr/