Html Code:
<input type="text" name="input-1" class="input-1" value="001 / 2007">
<input type="button" id="asd" value="check">
JS Code
$(document).ready(function (){
$("#asd").click(function (){
alert($("input[value='001 / 2007']").val());
$("input[value='001 / 2007']").val("001-2007");
});
});
The value changed through Jquery is not available to input[value...] selector after the change, it is still selects based on the old value. Here is the live code http://jsfiddle.net/WwRVy/, So question is how to select input based on latest value?
$("input[value^='001']")..??id, or just select the element based on itsname?