I\'m having a hard time with getting the value of my dynamically appended textboxes. I\'m using the $.each function to iterate all of the textboxes according to
If you want to stick with prefixed ids for the inputs you can use the jquery wildcard selector. ALso instead of using a jquery selector to retrieve the value of the grade you can simply use the item passed into the function. As mentioned adding a class to the input may be a more efficient way to proceed.
$('#save_grade_button').click(function (){
$.each($("input[id^='student_grde_G']"), function(i, item) { //uses wildcard selector
var grade = $(item).val(); //Use item instead of selector
alert(grade);
});
});
Example: http://jsbin.com/axenuj/1/edit