[jQuery] cant parseInt
[jQuery] cant parseInt
Hey... i cant manage it...
i just want to increase a value...
by jQuery:
var cont = $("#img_counter").val(); //its an input value
cont = parseInt(cont + 5);
$("#img_counter").val(cont);
by simple JS:
var cont = document.getElementById("img_contador").value;
var cont = parseInt(cont + 1);
document.getElementById("img_contador").value = cont;
//output of both routines:
0
05
055
0555
05555
=( where am i wrong?
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/