own plugin - javascript error

own plugin - javascript error

Hi,

I wrote a small plugin to create a fat dropdown menu. all works fine, although an js error occured. I hope anyone could help :)

Here a part of the code:

  1. jQuery.fn.eFatMenu = function(params) {
  2.     var tthis = jQuery(this);
  3.     var newMethods = {
            initiate_global: function() {
  4.             ...
  5.         },
  6.         ....
  7.      };
  8.     jQuery.each(newMethods, function(i) {
            jQuery.fn[i] = this;
        });

        return tthis.each(function() {
            tthis = $(this);
        });

    };

    $( function() {
        $().eFatMenu().initiate_global();
    });











So, as I said all works fine. But I get an error:

  1. $().eFatMenu is not a function
  2.        $().eFatMenu().initiate_global();

Thanks for your help.
Best Regards

skhamburg