Bootstrap snippet Textarea with character count

This bootstrap snippet "Textarea with character count" was designed to help people of all skill levels - designer or developer, huge nerd or early beginner.
copy and paste the code. Use it as a complete kit or use it to start something more complex.
tags: count,validation,form

<div class="col-sm-4 well"> <form accept-charset="UTF-8" action="" method="POST"> <textarea class="form-control" id="text" name="text" placeholder="Type in your message" rows="5"></textarea> <h6 class="pull-right" id="count_message"></h6> <button class="btn btn-info" type="submit">Post New Message</button> </form> </div>
#text { resize: none; margin-botton:10px; }
var text_max = 200; $('#count_message').html(text_max + ' remaining'); $('#text').keyup(function() { var text_length = $('#text').val().length; var text_remaining = text_max - text_length; $('#count_message').html(text_remaining + ' remaining'); });

Textarea with character count

  Jun 11th 2014, 00:18