<?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: jQuery Plugin Boilerplate</title>
	<atom:link href="http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/feed/" rel="self" type="application/rss+xml" />
	<link>http://stefangabos.ro</link>
	<description>web developer extraordinaire</description>
	<lastBuildDate>Thu, 17 May 2012 13:19:04 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
	<item>
		<title>By: Vall</title>
		<link>http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/comment-page-1/#comment-1315</link>
		<dc:creator>Vall</dc:creator>
		<pubDate>Thu, 19 Apr 2012 10:06:15 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=1236#comment-1315</guid>
		<description>Hello,

first of all, nice boilerplate. Was looking for something similar for a while now. I&#039;m having a problem with initializing it, the line:
var myplugin = new $.pluginName($(&#039;#element&#039;));

returns:
TypeError: $.pluginName is not a constructor

Any idea what I&#039;m doing wrong? ;-)
#element exists and myplugin variable is not defined before initialization.

Thanks!</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>first of all, nice boilerplate. Was looking for something similar for a while now. I&#8217;m having a problem with initializing it, the line:<br />
var myplugin = new $.pluginName($(&#8216;#element&#8217;));</p>
<p>returns:<br />
TypeError: $.pluginName is not a constructor</p>
<p>Any idea what I&#8217;m doing wrong? <img src='http://stefangabos.ro/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /><br />
#element exists and myplugin variable is not defined before initialization.</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rob</title>
		<link>http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/comment-page-1/#comment-1227</link>
		<dc:creator>Rob</dc:creator>
		<pubDate>Wed, 28 Mar 2012 01:43:37 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=1236#comment-1227</guid>
		<description>That&#039;s a nice boilerplate, I would also include the ability to modify existing settings though like in this one: http://www.websanova.com/tutorials/jquery/jquery-plugin-development-boilerplate</description>
		<content:encoded><![CDATA[<p>That&#8217;s a nice boilerplate, I would also include the ability to modify existing settings though like in this one: <a href="http://www.websanova.com/tutorials/jquery/jquery-plugin-development-boilerplate" rel="nofollow">http://www.websanova.com/tutorials/jquery/jquery-plugin-development-boilerplate</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Gabos</title>
		<link>http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/comment-page-1/#comment-1147</link>
		<dc:creator>Stefan Gabos</dc:creator>
		<pubDate>Fri, 02 Mar 2012 04:40:07 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=1236#comment-1147</guid>
		<description>so that developers can perform specific tasks at specific time points; like jQuery&#039;s animate(), which executes a function when it&#039;s done.</description>
		<content:encoded><![CDATA[<p>so that developers can perform specific tasks at specific time points; like jQuery&#8217;s animate(), which executes a function when it&#8217;s done.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/comment-page-1/#comment-1140</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 28 Feb 2012 16:53:19 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=1236#comment-1140</guid>
		<description>What is the point of the callback methods (like onSomeEvent()) in the defaults? Why not just use public functions?

Thanks!</description>
		<content:encoded><![CDATA[<p>What is the point of the callback methods (like onSomeEvent()) in the defaults? Why not just use public functions?</p>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph</title>
		<link>http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/comment-page-1/#comment-1130</link>
		<dc:creator>Joseph</dc:creator>
		<pubDate>Sat, 25 Feb 2012 08:46:27 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=1236#comment-1130</guid>
		<description>Thanks for this awesome template. However, I noticed that to start the plugin, you need this &quot;messy code&quot; to do it:

var myplugin = new $.pluginName($(&#039;#element&#039;),{options...});

why not send the selector string:

var myplugin = new $.pluginName(&#039;#element&#039;,{options...});

and in the plugin template, do this:

plugin.el = $(el);</description>
		<content:encoded><![CDATA[<p>Thanks for this awesome template. However, I noticed that to start the plugin, you need this &#8220;messy code&#8221; to do it:</p>
<p>var myplugin = new $.pluginName($(&#8216;#element&#8217;),{options&#8230;});</p>
<p>why not send the selector string:</p>
<p>var myplugin = new $.pluginName(&#8216;#element&#8217;,{options&#8230;});</p>
<p>and in the plugin template, do this:</p>
<p>plugin.el = $(el);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Gabos</title>
		<link>http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/comment-page-1/#comment-1015</link>
		<dc:creator>Stefan Gabos</dc:creator>
		<pubDate>Fri, 20 Jan 2012 08:03:29 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=1236#comment-1015</guid>
		<description>yes, that&#039;s pretty much it. 
i do it like this:
&lt;pre&gt;&lt;code&gt;// first make sure that there is a callback function 
if (plugin.settings.onSomeEvent &amp;&amp; typeof plugin.settings.onSomeEvent== &#039;function&#039;)

    // execute the callback function
    plugin.settings.onSomeEvent(arg1, arg2, ... argn);&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>yes, that&#8217;s pretty much it.<br />
i do it like this:</p>
<pre><code>// first make sure that there is a callback function
if (plugin.settings.onSomeEvent &amp;&amp; typeof plugin.settings.onSomeEvent== 'function')

    // execute the callback function
    plugin.settings.onSomeEvent(arg1, arg2, ... argn);</code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Gabos</title>
		<link>http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/comment-page-1/#comment-1014</link>
		<dc:creator>Stefan Gabos</dc:creator>
		<pubDate>Fri, 20 Jan 2012 08:01:31 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=1236#comment-1014</guid>
		<description>it&#039;s common sense: just create the plugin like
&lt;pre&gt;&lt;code&gt;$.pluginName = function(options) {&lt;/code&gt;&lt;/pre&gt;
and remove all the references to el...</description>
		<content:encoded><![CDATA[<p>it&#8217;s common sense: just create the plugin like</p>
<pre><code>$.pluginName = function(options) {</code></pre>
<p>and remove all the references to el&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: P.J.</title>
		<link>http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/comment-page-1/#comment-1010</link>
		<dc:creator>P.J.</dc:creator>
		<pubDate>Fri, 20 Jan 2012 01:19:40 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=1236#comment-1010</guid>
		<description>One more question, how would I trigger the object&#039;s event hooks (set in the defaults variable)? For example, if I wanted to trigger onSomeEvent when an input&#039;s value was changed or a button was clicked, is this the proper way to do it?

&lt;pre&gt;&lt;code&gt;myplugin.settings.onSomeEvent;&lt;/code&gt;&lt;/pre&gt;

Thanks!</description>
		<content:encoded><![CDATA[<p>One more question, how would I trigger the object&#8217;s event hooks (set in the defaults variable)? For example, if I wanted to trigger onSomeEvent when an input&#8217;s value was changed or a button was clicked, is this the proper way to do it?</p>
<pre><code>myplugin.settings.onSomeEvent;</code></pre>
<p>Thanks!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: P.J.</title>
		<link>http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/comment-page-1/#comment-1009</link>
		<dc:creator>P.J.</dc:creator>
		<pubDate>Thu, 19 Jan 2012 21:39:33 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=1236#comment-1009</guid>
		<description>Great thanks! Now for another question:

I&#039;m using your boilerplate template for a plugin that will accept several options and do a lot of editing on different dom elements, Ajax calls, etc. I&#039;ll need to pass in options, but there&#039;s no need to pass in &quot;el&quot; since the plugin doesn&#039;t need to be attached to any specific element.

Should I just create an empty span element or something, and ignore the &quot;el&quot; parameter?</description>
		<content:encoded><![CDATA[<p>Great thanks! Now for another question:</p>
<p>I&#8217;m using your boilerplate template for a plugin that will accept several options and do a lot of editing on different dom elements, Ajax calls, etc. I&#8217;ll need to pass in options, but there&#8217;s no need to pass in &#8220;el&#8221; since the plugin doesn&#8217;t need to be attached to any specific element.</p>
<p>Should I just create an empty span element or something, and ignore the &#8220;el&#8221; parameter?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Gabos</title>
		<link>http://stefangabos.ro/jquery/jquery-plugin-boilerplate-oop/comment-page-1/#comment-1002</link>
		<dc:creator>Stefan Gabos</dc:creator>
		<pubDate>Tue, 17 Jan 2012 07:55:58 +0000</pubDate>
		<guid isPermaLink="false">http://stefangabos.ro/?page_id=1236#comment-1002</guid>
		<description>just use $.noConflict() after loading jQuery but before running any jQuery code, and that should take care of everything

read more at &lt;a href=&quot;http://api.jquery.com/jQuery.noConflict/&quot; rel=&quot;nofollow&quot;&gt;http://api.jquery.com/jQuery.noConflict/&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>just use $.noConflict() after loading jQuery but before running any jQuery code, and that should take care of everything</p>
<p>read more at <a href="http://api.jquery.com/jQuery.noConflict/" rel="nofollow">http://api.jquery.com/jQuery.noConflict/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

