Jquery getting list of values of hidden inputs within a div
Posted
by RandyMarsh
on Stack Overflow
See other posts from Stack Overflow
or by RandyMarsh
Published on 2010-03-30T15:48:37Z
Indexed on
2010/03/30
15:53 UTC
Read the original article
Hit count: 264
jQuery
|JavaScript
I am trying to get a list of values within a div that I will format later using the .each() method. They are input values which are hidden my html and jquery call looks like this.
<div id="container_0">
<input type="hidden" id="check_data" value=10>
<input type="hidden" id="check_data" value=20>
</div>
Jquery:
var list = $('#container_0 input#check_data');
$(list).each(
function() {
alert($(this).val());
}
);
This however is not returning any values. Any help would be greatly appreciated.
© Stack Overflow or respective owner