Skip to content

Instantly share code, notes, and snippets.

View solidnerd's full-sized avatar
🦆

Niclas Mietz solidnerd

🦆
View GitHub Profile
@solidnerd
solidnerd / TextAreaMessageCounter.js
Last active August 29, 2015 14:01
Uses JQuery to count letters on a TextArea
var messageCount=0;
$(document).ready(onReady);
function onReady(){
$("input").powerTip({placement:'n'});
$("textarea").powerTip({placement:'n'});
$("textarea").keyup(function(){
if(messageCount < 160){
messageCount = $(this).val().length;