Reputation: 754
Can you change the value of an input field based on the original value?
<input type="checkbox" value="fooBar1" class="checkbox" />
<input type="checkbox" value="fooBar2" class="checkbox" />
Was trying something like this ...
if ($('.checkbox').val() == 'fooBar1') {
$(this).val('1');
}
Upvotes: 0
Views: 90
Reputation:
if ($("input.checkbox").attr("value") == "fooBar1") {
$(this).attr("value","NEW VALUE");
}
Upvotes: 1