Hi!

I'm building a jQuery (1.32) plugin for use with Wordpress (2.85).

My problem is that when i'm extending the jQuery.fn object, the
function is not added to jQuery.fn.

Suppose that the plugin is a simple one like the following.

jQuery.fn.zapp = function()
{
   alert("zapp!");
}

It is registered in jquery.zapp.js like this:

(function($)
{
    jQuery.fn.zapp = function()
    {
       alert("zapp!");
    }
})(jQuery);

When trying to use the plugin in document.ready, the function is not
recognized. If i take a look at jQuery.fn in firebug the function is
not registered.

I have the same problem if I declare my plugin in the original
jquery.js file, as well as in the same document as my document.ready
call.

The only situation that works is when i declare the plugin INSIDE
document.ready.

To me, this is really strange. Am I missing something completely
obvious?

Reply via email to