Search

Rss Posts

Rss Comments

Login

 

Pretty comments

Feb 01

UPDATE: Please refer to this post for support/updates on prettyComments

Here’s a small jQuery plugin that allow textareas to strech as content is put in. If the content goes over the defined height of the textarea, the textarea will stretch.

So no need to more scroll up in that cramped space to take a look at what you wrote 10 lines before.

It’s really easy to use, just download the file pretty-comments.js and include it in the html page where you want to allow the comment box stretching. Then put that bit of code in that same page to include the script:

<script src=“the-path/js/pretty-comments.js” type=“text/javascript” charset=“utf-8″></script>

You can then play a bit with the options which are located at the top of the javascript file, you can define if you want to have it animated or not and the speed of the animation.

Then put that bit of code in the same page you have your comment box, you need to pass the comment box id as a parameter for it to work.

<script type=”text/javascript” charset=”utf-8″>
$(document).ready(function(){
prettyComments.init(’comment’);
});
</script>

That’s really all there’s to it, if you want a demo, just leave a comment, you’ll see the box stretch :)

Files: Un-compressed (3kb,options)
Packed (1kb, animated, no options)

Demo: Right in that page, just enter a lot of content in the comment box.

If you notice any bug, need any support, just leave a comment, I’ll do my best to help you!

Note: You also need the jQuery library in order to use this plugin

Update: Version: 1.1 relased! Now the textarea can shrink back to it’s original size when you delete content from it!

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks

85 Comments

Add your comment

Pages: « 1 [2] Show All

  1. legolex
    #51 Sep 15 at 16:23

    Thank you!

  2. madfly
    #52 Sep 19 at 09:44

    this is very good

  3. ying
    #53 Sep 24 at 08:54

    Do you want to add a captcha function with this good comment plugin?

  4. Stephane Caron
    #54 Sep 25 at 07:52

    @ying I don’t plan to add captcha support. This plugin is really only to expand the textarea as the user type content in it. It doesn’t interact with the backend in any way.

    Thanks!

  5. ponytail
    #55 Nov 05 at 20:10

    wonderful,i‘ll have a try~~

  6. Jahedur Rahman
    #56 Jan 07 at 04:43

    Nice :)

  7. dfdfddfdf
    #57 Jan 23 at 15:32

    haber

  8. Вита
    #58 Feb 05 at 08:45

    Супер!! Не смог удпржаться, и не ответить))

  9. Лавка
    #59 Feb 05 at 12:02

    Классный пост однако, хотя и не все понял..

  10. Silvia
    #60 Feb 16 at 05:53

    Привет всем, я наконец-то начала создавать комменыт!

  11. Blgo
    #61 Feb 17 at 03:28

    Прекрасно, было очень познавательно, спасибо!

  12. Renaga
    #62 Feb 17 at 06:06

    Где можно подробнее почитать по эттй тематике, кроме http://www.no-margi-nfor-errors.com?

  13. Aygool
    #63 Feb 17 at 08:33

    Привет! Всеьма увлекательно было чиитать ваш дневвник! Зеходите и в мой дневник!

  14. kickerps
    #64 Feb 18 at 09:21

    Просто хоче проверит, как работают комментарии

  15. qw
    #65 Feb 24 at 10:46

    asddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddaaaaaaaaaaaaaaaas
    asdadas

  16. cybermad
    #66 Feb 24 at 12:46

    testcomment

  17. name
    #67 Feb 26 at 00:31

    o.O

  18. Daniel
    #68 Mar 01 at 16:23

    Thank you

  19. lkll
    #69 Mar 17 at 13:57

    sd

  20. mag
    #70 Mar 19 at 03:23

    cool!

  21. alin
    #71 Mar 20 at 16:52

    coool

  22. visual
    #72 Mar 23 at 13:33

    Cool

  23. Tope
    #73 Mar 29 at 05:06

    hello!!

  24. Ruiguicle
    #74 Apr 15 at 05:02

    Теперь я скажу несколько слов о подводке к дичи молодой собаки и о ее стойке.(В работе собаки по дичи следует различать 4 момента (подразделения) ее работы:

    1 — поиск, длящийся до того момента, как собака начнет причуивать признаки присутствия дичи в доступном для ее чутья расстоянии;

    2 — потяжку — работа собаки, разбирающейся в донесшемся до нее запахе до момента окончательного определения ею наличия дичи; эта работа заканчивается

  25. javi
    #75 Apr 19 at 15:54

    jo tio que guay

  26. umar
    #76 May 14 at 18:11

    coments

  27. pairson
    #77 May 15 at 06:47

    试下先

  28. dadsds
    #78 May 20 at 03:18

    daadsd

  29. my name
    #79 May 21 at 21:07

    this is my comment

  30. sama
    #80 May 27 at 10:03

    thanks

  31. JuaNe
    #81 May 30 at 22:11

    Let’s see… this looks good…

  32. В общем-то согласен :) Для меня это точно очень актуально :)

  33. Марк
    #83 Jun 26 at 21:56

    Хорошая статья, как и все предыдущие были. Буду теперь и дальше следить .

  34. cools
    #84 Jun 30 at 03:18

    test

  35. Lase
    #85 Jun 30 at 03:19

    let me see….

Pages: « 1 [2] Show All

Post a comment