How do i cycle through all form inputs with a certain name and set those to a specified value?
I tried this jsfiddle and i can't get it to work. http://jsfiddle.net/qvcA6/
$(document).ready(function() {
$("#link-1").click(function() {
$('[name=price]','#myform').val('0.00');
});
});
EDIT: i didn't think it would matter, but the array key for the form field name isn't accounted for. So all of your examples are working but they break when i put keys in the field names. Anybody know how to go about accounting for the keys? updated jsfiddle -> http://jsfiddle.net/qvcA6/8/