[jQuery] Re: Plugin Authoring and $.extend

2009-12-30 Thread MorningZ
anything that the docs doesn't explain properly? it pretty much combines two objects, saving the result in the object specified as the first parameter... in Mike's awesome article, he has default values but if the user passes in options, the .extend() method overwrites the defaults with what the

[jQuery] Re: Plugin Authoring and $.extend

2009-12-30 Thread MorningZ
oops.. that should say: the third: $.extend(obj2, obj3);

[jQuery] Re: Plugin Authoring and $.extend

2009-12-30 Thread T.J. Simmons
You know, I see it now; it says in the documentation The object that will be merged into the jQuery object... I read that and took it to be the core of jQuery itself, since the documentation only lists one argument for $.extend. In Mike's article I saw that it was combining two things, I just

[jQuery] Re: Plugin Authoring and $.extend

2009-12-30 Thread Scott Sauyet
On Dec 30, 1:35 pm, T.J. Simmons theimmortal...@gmail.com wrote: You know, I see it now; it says in the documentation The object that will be merged into the jQuery object... I read that and took it to be the core of jQuery itself, since the documentation only lists one argument for $.extend.

[jQuery] Re: Plugin Authoring and $.extend

2009-12-30 Thread T.J. Simmons
You know, I didn't even realize there was two differing sets of documentation; that would explain why I was confused as to the multitude of arguments passed when the documentation listed only one. I appreciate the help; you guys cleared that up for me. Thanks. -- T.J. On Dec 30, 4:04 pm, Scott

[jQuery] Re: Plugin Authoring Code Example Incorrect

2009-11-08 Thread Shane Riley
I ended up using this syntax instead: return this.each(function(){}); On Nov 7, 11:43 am, Morten Maxild mmax...@gmail.com wrote: 'return true' is wrong, you need to return the 'wrapped set' to support chaining. The $().each method does return the 'wrapped set' and you can take advantage of

Re: [jQuery] Re: Plugin Authoring Code Example Incorrect

2009-11-08 Thread Morten Maxild
Exactly...looks correct:-) -Original Message- From: Shane Riley [mailto:shanerileydoti...@gmail.com] Sent: Sunday, November 08, 2009 6:44 PM To: jQuery (English) Subject: [jQuery] Re: Plugin Authoring Code Example Incorrect I ended up using this syntax instead: return this.each(function

Re: [jQuery] Re: Plugin Authoring Code Example Incorrect

2009-11-08 Thread Karl Swedberg
:-) -Original Message- From: Shane Riley [mailto:shanerileydoti...@gmail.com] Sent: Sunday, November 08, 2009 6:44 PM To: jQuery (English) Subject: [jQuery] Re: Plugin Authoring Code Example Incorrect I ended up using this syntax instead: return this.each(function(){}); On Nov 7, 11:43 am

Re: [jQuery] Re: Plugin Authoring Code Example Incorrect

2009-11-08 Thread Shane Riley
To: jQuery (English) Subject: [jQuery] Re: Plugin Authoring Code Example Incorrect I ended up using this syntax instead: return this.each(function(){}); On Nov 7, 11:43 am, Morten Maxild mmax...@gmail.com wrote: 'return true' is wrong, you need to return the 'wrapped set' to support chaining

[jQuery] Re: Plugin Authoring Help pt 2

2008-03-05 Thread Danny
By the way, you'll have trouble if you use defaults like this: $.fn.myPlugin1 = function(options) { var myOptions = $.extend(defaults, options); since that will actually extend the defaults object and your defaults will be changed whatever was in options for the next time you use the plugin.

[jQuery] Re: Plugin Authoring Help pt 2

2008-03-05 Thread jquertil
ugh, I' min the same boat. I hope some of the superstars will eventually get around to writing more detailed tutorials. been struggling with extension writing myself. On Mar 4, 11:09 am, Leanan [EMAIL PROTECTED] wrote: Ok, I'm really trying to wrap my head around this, and it's irritating me.

[jQuery] Re: Plugin Authoring Help pt 2

2008-03-05 Thread J Moore
You might find it easier to simply create objects that use jquery, instead of writing a jquery plugin. The biggest advantage is that you actually have a normal instance of an object. You can pass this instance to other objects, call other methods on it... all the usual good stuff. (jquery

[jQuery] Re: Plugin Authoring Help pt 2

2008-03-05 Thread Chris Jordan
J, I for one sure hope that someone follows up on your particular thoughts here. I've not thought of doing what you're talking about here, and I'd love to read other experts opinions on the subject. Thanks for adding to this thread. :o) Chris On Wed, Mar 5, 2008 at 8:57 AM, J Moore [EMAIL

[jQuery] Re: Plugin Authoring Help pt 2

2008-03-04 Thread Mike Alsup
If you want to use two different functions in the chain then you need to define two plugin functions: // wrap it all in a closure so you can share private data easily (function() { $.fn.myPlugin1 = function(options) { var myOptions = $.extend(defaults, options); // do stuff };

[jQuery] Re: Plugin authoring

2007-05-08 Thread Shelane
Since there were no takers, I created space on Google code. It's a bit of an overkill, but oh well. http://code.google.com/p/jqueryselectcombo/ A jQuery plugin for populating data of a select item from results of another select item. A Select Combo is setting the values of a select element

[jQuery] Re: Plugin authoring

2007-05-08 Thread Christopher Jordan
It's a wiki... you can add it yourself. that's what I did. :o) Chris Shelane wrote: Since there were no takers, I created space on Google code. It's a bit of an overkill, but oh well. http://code.google.com/p/jqueryselectcombo/ A jQuery plugin for populating data of a select item from

[jQuery] Re: Plugin authoring

2007-05-08 Thread Shelane Enos
Done. Thanks. On 5/8/07 3:58 PM, Christopher Jordan [EMAIL PROTECTED] wrote: It's a wiki... you can add it yourself. that's what I did. :o) Chris Shelane wrote: Since there were no takers, I created space on Google code. It's a bit of an overkill, but oh well.

[jQuery] Re: Plugin authoring

2007-04-17 Thread Aaron Heimlich
On 4/17/07, Josh Nathanson [EMAIL PROTECTED] wrote: 1) I'm not adding any methods, just functions (I think) - the calls would be in the form $.jqURL.myfunc() -- so am I writing a plugin or an extension? In my mind, there really isn't much of a difference (if any) between plugins and