Multiple jQuery plugins in one file
<p>Is it possible to have multiple jquery plugins in one file under (function( $ )</p>

<p>If it is possible then I have a really wierd issue.  There are two plugins in my single file both sitting in the following structure:</p>

<pre><code>jQuery(document).ready(function() {

(function( $ ){
</code></pre>

<p>//PLUGINS HERE</p>

<pre><code>})( jQuery );

});
</code></pre>

<p>Both are using the standard pattern of declaring the variable $this as a varablie within a .each iteration returning the main function of each plugin.</p>

<p>However, what is happening is that the plugin declared last is taking the $this variable from the the first pugin, even although the $this variable is declared within the .each function.  I thought javascript had function scop level so this should be possible.</p>

<p>EDIT:</p>

<p>Solved this.  This was the issue incase anyone else has the same issue in future:</p>

<p><a href="http://stackoverflow.com/questions/4664971/how-to-isolate-functionalities-between-multiple-jquery-plugins-in-same-page">How to isolate functionalities between multiple jQuery Plugins in Same Page</a></p>
