title: Reuse a Jquery Script
body: <p>I'm trying to reuse a function i made, but with any help yet.</p>
  <p>Here is my index.html.</p>
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src=&quot;jquery-1.5.1.js&quot;)&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  &lt;script src=&quot;JqueryScript.js&quot;)&quot; type=&quot;text/javascript&quot;&gt;&lt;/script&gt;
  &lt;script type=&quot;text/javascript&quot;&gt; 
      //MYLIBRARY.init(['#button1']);
      execute(['#button1']);
      execute(['#button2']);
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;button type=&quot;button&quot; id=&quot;button1&quot;&gt;Click Me!&lt;/button&gt;
  &lt;button type=&quot;button&quot; id=&quot;button2&quot;&gt;Click Me!&lt;/button&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  <p>And here is my script.</p>
  <pre><code>function execute (Args){
      _args = Args;
      $(function() {
          $(_args[0]).click(function() {
            alert(&quot;hello &quot; + _args[0]);
            return false;
          });
      });
  }
  </code></pre>
  <p>The problem is always triggers the second alert windows (#button2). How can i make it work with both alert windows?</p>