[jQuery] How do I adapt this code for multiple uses?

[jQuery] How do I adapt this code for multiple uses?


I have got some code http://pastebin.com/mc99132c which counts how
many characters have been entered in a textbox and subtracts it from
the maxlength to show how many characters are left.
If I add a new textbox I don't want to copy and paste the code down
and rename the variables so is there a way of navigating the DOM tree
to change just the element currently being edited?
Cheers, Ian.
http://pastebin.com/mc99132c