The jQuery Comment Previewer

This is a small piece of code that is mostly the brain child of the incredible David Walsh. His version is written in MooTools and you can see it here. There are a few differences however, I removed some of the basic form validation, I set up a Gravatar function to be called onBlur rather then keyUp because the flashing Gravatar on each key stroke just got really annoying. While I prefer MooTools I did this in jQuery because:

  1. David Walsh already did an excellent MooTools version.
  2. Depending on its popularity I might make this into a WordPress plugin. And since most themes and WordPress are already using jQuery I figured that was the largest market.
  3. Some of his commenters were requesting a jQuery version.

Demo and Download

You can see it in action here.
Download a zip here.

Popular Posts

Help The Javascript Blog

If you would like to write for The Javascript Blog or submit a plugin or class please feel free to contact us.


One Response

03.15.11

This is really a nice plugin but I have a small issue, when user enters a long line comment than the preview section is exceeding the limits. Can’t we impose new line when the line length reaced to the textbox length ?

Thanks

Leave Your Response

* Name, Email, Comment are Required