I am trying to reset fields (selects and textboxes) in a partial. Here is what I have so far:
var $inputs = $('#StudentTable :select');
$inputs.each(function () {
if ($(this).name = "TeachingAsstSelect") {
$('select[name="TeachingAsstSelect"]').each(function () {
$(this).text("");
})
}
else {
$(this).val("Select");
}
});
Here "TeachingAsstSelect" is being cleared, but other selects are not reset. Am I missing something? More importantly, Am I doing it the right way?