From: tres <TresHug...@gmail.com>
Date: Mon, 11 May 2009 16:25:19 -0700 (PDT)
Local: Mon, May 11 2009 7:25 pm
Subject: Re: Structure Plugin Authoring
Glad to hear. The code above can be copied and pasted, given that you
have the script tags pointing to the correct scripts. The new version is 1.3+ only. --
On May 11, 6:23 pm, Lee Henson <lee.m.hen...@gmail.com> wrote:
> Hi Trey,
> In the end I reverted to an earlier version of your code which seems
> Cheers
> On May 10, 1:00 am, tres <TresHug...@gmail.com> wrote:
> > Lee,
> > I've sent you an email, but here it is for everyone else:
> > --
> > Sorry, I didn't see your post. Google groups can be difficult
> > Anyways, sorry about that. Since there is no official release yet and
> > There are 3 ways to attach plugins to $ or $.fn. The following pass in
> > I hope this helps. You can also grab the plugin off Google Code at:http://code.google.com/p/jquery-plugin-dev/source/browse/trunk/jquery....
> > CODE:
> > --------------------------------------------------------------------------- -------------
> > <script type="text/javascript" src="jquery-1.3.2.js"></script>
> > ;(function($) {
> > /*
> > // static plugin
> > // then use .fn or .prototype on that plugin to add methods
> > return this;
> > // then use .fn or .prototype on that plugin to add methods
> > return this;
> > /*
> > // static plugin
> > return this;
> > $.test2.staticMethod = function(arg) {
> > return this;
> > $.test2.fn.instanceMethod = function(arg) {
> > return this;
> > /*
> > // create your plugin
> > return this;
> > // a static method
> > return this;
> > // an instance method
> > return this;
> > // now add it
> > /*
> > // static plugin
> > // then use .fn or .prototype on that plugin to add methods
> > return this;
> > // then use .fn or .prototype on that plugin to add methods
> > return this;
> > /*
> > // static plugin
> > return this;
> > $.fn.test5.staticMethod = function(arg) {
> > return this;
> > $.fn.test5.fn.instanceMethod = function() {
> > return this;
> > /*
> > // create your plugin
> > return this;
> > // a static method
> > return this;
> > // an instance method
> > return this;
> > // now add it
> > })(jQuery);
> > jQuery(function($) {
> > // construct objects
> > // test static methods
> > // test instance methods, can also be directly called
> > });
> > </script>
> > <div>
> > --------------------------------------------------------------------------- -------------
> > On Apr 10, 3:25 am, Lee Henson <lee.m.hen...@gmail.com> wrote:
> > > Hi Trey
> > > I'm trying to use your jquery.plugin.js as a basis for creating aplugin. I've got to :
> > > $.plugin.add('plugin_name', {
> > > another_method: function() {
> > > });
> > > But when I load the page I get a failure inside jquery.plugin.js
> > > applyTo[name].fn = applyTo[name].prototype = _constructor.prototype =
> > > func is my object hash of functions, so it does not have a
> > > Am I missing something in my code?
> > > Cheers
> > > On Mar 30, 11:50 pm, tres <TresHug...@gmail.com> wrote:
> > > > Btw, Daniel, I have changed the API to accomodate this.
> > > > jQuery.plugin.add('name', func || objectOfFuncs), will now add a
> > > > Static methods can be applied also by giving a static keyword with the
> > > > jQuery.plugin.add('name', {
> > > > });
> > > > then can be called: jQuery.name().someInstanceMethod() or
> > > > and
> > > > jQuery.fn.plugin.add('name', func || objectOfFuncs), will add it to
> > > > jQuery.plugin.remove('name') and jQuery.fn.plugin.remove('name') work
> > > > I'm putting together a full documentation and examples soon.
> > > > -Trey
> > > > On Mar 5, 1:34 pm, Daniel Friesen <nadir.seen.f...@gmail.com> wrote:
> > > > > I think it could do with the ability to handle methods on jQuery itself
> ...
> read more » You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||