I have a program that generates an account after the key is up. JQuery Code:
$('.today').keyup(function() {
var Presents = $('input[value="/"]:visible');
$("#counter").html( "Present: " + Presents.length );
});
HTML:
<input type="text" id="1" name="1" class="today" value="/">
<input type="text" id="2" name="2" class="today" value="/">
<input type="text" id="3" name="3" class="today" value="/">
<p id="counter"></p>
Tag counter will be displayed 3 after the first key press. When I change the value in the text fields, the value does not change in the counter field. EG. when I lose the value of the text box 3 through x, the tag
should now contain number 2. This is not currently changing.
source
share