<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Dave Smith.info &#187; plugin</title>
	<atom:link href="http://www.dave-smith.info/tag/plugin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dave-smith.info</link>
	<description>Just another Dave Smith</description>
	<lastBuildDate>Sat, 12 Jun 2010 23:01:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>jQuery plugin template</title>
		<link>http://www.dave-smith.info/jquery-plugin-template/2009/02/07/</link>
		<comments>http://www.dave-smith.info/jquery-plugin-template/2009/02/07/#comments</comments>
		<pubDate>Sat, 07 Feb 2009 22:45:38 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[template]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=77</guid>
		<description><![CDATA[Wanting a quick way to create a plugin in jQuery I found A Plugin Development Pattern (Learning jQuery), by Mike Alsup, via Improving upon the jQuery Plugin Template (Google Groups). Later, much later, I looked in the more obvious place; Plugins/Authoring (jQuery). I work best from hacking examples, so Mike Alsup&#8217;s pattern/template was the most [...]]]></description>
			<content:encoded><![CDATA[<p>Wanting a quick way to create a plugin in jQuery I found <a href="http://www.learningjquery.com/2007/10/a-plugin-development-pattern">A Plugin Development Pattern (Learning jQuery)</a>, by Mike Alsup, via <a href="http://groups.google.com/group/jquery-en/browse_thread/thread/3c6a35bbb7ff7e82/d8f1823893516735?#d8f1823893516735">Improving upon the jQuery Plugin Template (Google Groups)</a>. Later, much later, I looked in the more obvious place; <a href="http://docs.jquery.com/Plugins/Authoring">Plugins/Authoring (jQuery)</a>. I work best from hacking examples, so Mike Alsup&#8217;s pattern/template was the most useful to me.<span id="more-77"></span></p>
<p>The only difference between the following template and Mike Alsup&#8217;s is that I&#8217;ve stripped it down to just the essentials.</p>
<h3>The template</h3>
<pre>(function($)
{
	$.fn.plugin = function(options)
	{
		// Set the options.
		options = $.extend({}, $.fn.plugin.defaults, options);

		// Go through the matched elements and return the jQuery object.
		return this.each(function()
		{
		});
	};
	// Public defaults.
	$.fn.plugin.defaults = {
		property: 'value'
	};
	// Private functions.
	function func()
	{
		return;
	};
	// Public functions.
	$.fn.plugin.func = function()
	{
		return;
	};
})(jQuery);</pre>
<h3>Updates</h3>
<ol>
<li>Removed &#8220;var&#8221; where not required, many thanks to Jim (<a href="http://www.dave-smith.info/2009/02/07/jquery-plugin-template/comment-page-1/#comment-961">Jim&#8217;s comment</a>)</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/jquery-plugin-template/2009/02/07/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>jQuery.linkify</title>
		<link>http://www.dave-smith.info/jquery-linkify/2008/12/21/</link>
		<comments>http://www.dave-smith.info/jquery-linkify/2008/12/21/#comments</comments>
		<pubDate>Sun, 21 Dec 2008 17:40:19 +0000</pubDate>
		<dc:creator>Dave Smith</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[link]]></category>
		<category><![CDATA[linkify]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[section]]></category>

		<guid isPermaLink="false">http://www.dave-smith.info/?p=22</guid>
		<description><![CDATA[A plugin for jQuery turning sections into links. Read the jQuery.linkify page for a demo and more info.]]></description>
			<content:encoded><![CDATA[<p>A plugin for jQuery turning sections into links. Read the  <a href="http://www.dave-smith.info/jquery.linkify/">jQuery.linkify page</a> for a demo and more info.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dave-smith.info/jquery-linkify/2008/12/21/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
