a simple click event doesn't work

a simple click event doesn't work

I am building my own plugin, but I'm kind of new to this..
At the beginning, I immediately ran into this problem: a simple click event doesn't get fired.
Calling the plugin works, like so:
  1. $('img').myPlugin();
The (very basic) structure of my plugin is like the following piece of code
  1. (function($) {
  2.     $.fn.myPlugin = function() {
  3.         // call function
  4.         return this.each(function() {
  5.             // store element in variable
  6.             var self = $(this);
  7.             // bind the click function
  8.             self.bind('click', function() {
  9.                 alertAltText(self);
  10.             });
  11.         });

  12.         // alert alternative text
  13.         function alertAltText(obj) {
  14.             alert(obj.attr('alt'));
  15.         }
  16.     }
  17. })(jQuery);

So, what I want:
If you would click on an image, javascript alerts the alternative text of that image. But this doesn't work. It seems like this really is a noob-problem, but I can't get it to work no matter what I try (but as I said, I'm kind of new to this).

Does anybody know the solution?