how do the plugins work?

how do the plugins work?

what is wrong with this plugin? text is not added!

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
  2. <html lang="en">
  3. <head>
  4. <title>jQuery plugin: reverseText demonstration</title>
  5. <script type="text/javascript" src="jquery-1.4.2.js"></script>
  6. </head>
  7. <body>
  8. <script type="text/javascript">
  9. (function($) {
  10.    $.fn.addText = function(params) {
  11.          $(this).append('See on test');
  12.    };
  13. })(jQuery);
  14. $('#kala').addText({});
  15. </script>
  16. <div id="kala"></div>
  17. </body>
  18. </html>