I'm retrieving an element on the page with JQuery and trying to get the "value" attribute like this:
var myVar = $("#elmId").attr("value");
but myVar ends up being "undefined".
I know I can get the element itself because this line works fine:
var myVar = $("#elmId");
Why doesn't attr() work?