I am getting a wrong output when i alert this, it shows '01'
<input type="hidden" id="hidNavigation" name="hidNavigation" value="0" />
alert($("#hidNavigation").val($("#hidNavigation").val() + 1));
I am a newbie using jquery, please help me how to increment/decrement values in jquery.
Thanks, Nash
alert($("#hidNavigation").val(parseInt($("#hidNavigation").val()) + 1));
$("#hidNavigation").get(0).value++
Simply reposted from comment to @DarinDimitrov answer ... credits to @northamerican
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With