<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Making a jQuery Plugin Truly Customizable</title>
	<atom:link href="http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/feed" rel="self" type="application/rss+xml" />
	<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable</link>
	<description>Tips, techniques, and tutorials for the jQuery JavaScript library</description>
	<lastBuildDate>Sun, 14 Mar 2010 16:12:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Paginate Anything with jQuery! &#124; Software Source Update</title>
		<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/comment-page-1#comment-79252</link>
		<dc:creator>Paginate Anything with jQuery! &#124; Software Source Update</dc:creator>
		<pubDate>Sun, 29 Nov 2009 01:55:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=641#comment-79252</guid>
		<description>[...] Making a jQuery Plugin Truly Customizable [...]</description>
		<content:encoded><![CDATA[<p>[...] Making a jQuery Plugin Truly Customizable [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/comment-page-1#comment-78671</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Wed, 09 Sep 2009 16:35:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=641#comment-78671</guid>
		<description>Hi, really nice article,
I&#039;ve just a question regarding JSLINT. It suggests this : 

/////////
Move the invocation into the parens that contain the function.
.....
....})(jQuery);
/////////

and now we get this :

/////////
....
....}(jQuery));
/////////

do you see something dangerous with this transformation?

Thank you very much.

Vincent</description>
		<content:encoded><![CDATA[<p>Hi, really nice article,<br />
I&#8217;ve just a question regarding JSLINT. It suggests this : </p>
<p>/////////<br />
Move the invocation into the parens that contain the function.<br />
&#8230;..<br />
&#8230;.})(jQuery);<br />
/////////</p>
<p>and now we get this :</p>
<p>/////////<br />
&#8230;.<br />
&#8230;.}(jQuery));<br />
/////////</p>
<p>do you see something dangerous with this transformation?</p>
<p>Thank you very much.</p>
<p>Vincent</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mr Speaker</title>
		<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/comment-page-1#comment-78629</link>
		<dc:creator>Mr Speaker</dc:creator>
		<pubDate>Tue, 08 Sep 2009 01:57:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=641#comment-78629</guid>
		<description>Thanks for the great blog! Just one thing that I like to do with my plugins is provide an &quot;unnamed&quot; callback kind of like in the jQuery core. Then you have your plugin signature as &lt;code&gt;$.fn.superGallery = function(options, callback)&lt;/code&gt; with the callback as the second parameter. When there are no options, you check to see if &quot;options&quot; are options or really the callback (this looks like how they do it in jQuery)
&lt;code&gt;&lt;pre&gt;var defaults = { delay : 80 };
if ( jQuery.isFunction( options ) ) {
	callback = options;
	options = {};
}
var settings = $.extend({}, defaults, options);&lt;/pre&gt;&lt;/code&gt;Something like that. Then you can call the callback like before (but check if you have to):
&lt;code&gt;if ( callback ) callback.call(this);&lt;/code&gt;
Then you can use the plugin without options:
&lt;code&gt;$(&#039;ul.imgs li&#039;).superGallery( function(){ /* callback */ } );&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for the great blog! Just one thing that I like to do with my plugins is provide an &#8220;unnamed&#8221; callback kind of like in the jQuery core. Then you have your plugin signature as <code>$.fn.superGallery = function(options, callback)</code> with the callback as the second parameter. When there are no options, you check to see if &#8220;options&#8221; are options or really the callback (this looks like how they do it in jQuery)<br />
<code>
<pre>var defaults = { delay : 80 };
if ( jQuery.isFunction( options ) ) {
	callback = options;
	options = {};
}
var settings = $.extend({}, defaults, options);</pre>
<p></code>Something like that. Then you can call the callback like before (but check if you have to):<br />
<code>if ( callback ) callback.call(this);</code><br />
Then you can use the plugin without options:<br />
<code>$('ul.imgs li').superGallery( function(){ /* callback */ } );</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: wheresrhys &#187; Blog Archive &#187; My jQuery plugin writing tips</title>
		<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/comment-page-1#comment-78495</link>
		<dc:creator>wheresrhys &#187; Blog Archive &#187; My jQuery plugin writing tips</dc:creator>
		<pubDate>Wed, 02 Sep 2009 18:58:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=641#comment-78495</guid>
		<description>[...] jQuery. There still is, but one thing that struck me is that there are a lot of great tutorials on writing jQuery plugins out there but none of them individually captures all the things that took my plugins [...]</description>
		<content:encoded><![CDATA[<p>[...] jQuery. There still is, but one thing that struck me is that there are a lot of great tutorials on writing jQuery plugins out there but none of them individually captures all the things that took my plugins [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DevSocialNetwork-UltimateWebNet</title>
		<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/comment-page-1#comment-78468</link>
		<dc:creator>DevSocialNetwork-UltimateWebNet</dc:creator>
		<pubDate>Tue, 01 Sep 2009 14:06:10 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=641#comment-78468</guid>
		<description>Nice thanks for the post but how would i add this to the Watermark plugin</description>
		<content:encoded><![CDATA[<p>Nice thanks for the post but how would i add this to the Watermark plugin</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: A Web Developer&#8217;s Bookmarks &#171; Hired Guns Creative</title>
		<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/comment-page-1#comment-77621</link>
		<dc:creator>A Web Developer&#8217;s Bookmarks &#171; Hired Guns Creative</dc:creator>
		<pubDate>Fri, 19 Jun 2009 08:11:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=641#comment-77621</guid>
		<description>[...] Learning jQuery: Making a jQuery Plugin Truly Customizable [...]</description>
		<content:encoded><![CDATA[<p>[...] Learning jQuery: Making a jQuery Plugin Truly Customizable [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maz</title>
		<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/comment-page-1#comment-72810</link>
		<dc:creator>maz</dc:creator>
		<pubDate>Sun, 12 Apr 2009 10:07:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=641#comment-72810</guid>
		<description>Nice post! But i do not like the &quot;callback way&quot; for serveral reasons.
- I have to install a callback for every instance of the plugin.
- There can be only one function set for callback.
- Calling a callback from a plugin with different &#039;this&#039; contexts might be annoying. (What the heck, where is &#039;this&#039; pointing to this time? And: With &#039;this&#039; i have access to some element but how do i access the plugin.)
I think it is more fun, if plugins would fire custom events instead of calling callbacks. The custom events should hold all related data. And &#039;this&#039; should always point to the plugin. With events i am able to register an event handler for the document and can handle multiple plugins with a single event listener.</description>
		<content:encoded><![CDATA[<p>Nice post! But i do not like the &#8220;callback way&#8221; for serveral reasons.<br />
- I have to install a callback for every instance of the plugin.<br />
- There can be only one function set for callback.<br />
- Calling a callback from a plugin with different &#8216;this&#8217; contexts might be annoying. (What the heck, where is &#8216;this&#8217; pointing to this time? And: With &#8216;this&#8217; i have access to some element but how do i access the plugin.)<br />
I think it is more fun, if plugins would fire custom events instead of calling callbacks. The custom events should hold all related data. And &#8216;this&#8217; should always point to the plugin. With events i am able to register an event handler for the document and can handle multiple plugins with a single event listener.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WebDevVote.com</title>
		<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/comment-page-1#comment-72796</link>
		<dc:creator>WebDevVote.com</dc:creator>
		<pubDate>Thu, 09 Apr 2009 09:19:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=641#comment-72796</guid>
		<description>You are voted!
Track back from WebDevVote.com.</description>
		<content:encoded><![CDATA[<p>You are voted!<br />
Track back from WebDevVote.com.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NYWebTeam</title>
		<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/comment-page-1#comment-72760</link>
		<dc:creator>NYWebTeam</dc:creator>
		<pubDate>Sat, 04 Apr 2009 03:03:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=641#comment-72760</guid>
		<description>Awesome article, really helpful. It&#039;s a must read for plugin developers.
Thank you.

F.</description>
		<content:encoded><![CDATA[<p>Awesome article, really helpful. It&#8217;s a must read for plugin developers.<br />
Thank you.</p>
<p>F.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Links: March 8th - March 12th &#124; The World According to Buchs</title>
		<link>http://www.learningjquery.com/2009/03/making-a-jquery-plugin-truly-customizable/comment-page-1#comment-72725</link>
		<dc:creator>Links: March 8th - March 12th &#124; The World According to Buchs</dc:creator>
		<pubDate>Wed, 01 Apr 2009 06:00:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.learningjquery.com/?p=641#comment-72725</guid>
		<description>[...] Making a jQuery Plugin Truly Customizable &#187; Learning jQuery - Tips, Techniques, Tutorials [...]</description>
		<content:encoded><![CDATA[<p>[...] Making a jQuery Plugin Truly Customizable &raquo; Learning jQuery &#8211; Tips, Techniques, Tutorials [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
