I'm unable to get the character counter to show an initial value.
When you type a something in, it says -1, -3, -4. It starts off at 0,
instead of the maximum amount allowed. I'd prefer it countdown from the
highest amount of characters allowed. 400, 399, 398, etc
$(document).ready(function() {
var counter, max_length, review_text;
review_text = $('#body');
counter = $('#counter');
max_length = counter.data('maximum-length');
review_text.keyup(function() {
counter.text(max_length - ($(this).val().length));
});
});
--
Posted via
http://www.ruby-forum.com/.