How can I get name property of HTML element with jQuery?
You should use attr('name') like this
attr('name')
$('#yourid').attr('name')
you should use an id selector, if you use a class selector you encounter problems because a collection is returned