Bootstrap framework snippet Textarea with character count

This bootstrap framework 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'); });

Creator of this snippet

Dey Dey

Bootstrap version: 3.1.1

Created: Jun 1st 2014, 19:45

Views: 3.0K