reusable function in jquery, how to pass calling item's value/id?
<p>I have a list of about 3 items. I would like to create a jquery function that will trigger whenever one of those list items is clicked. The function should then be able to do something using the value or attribute of the html list item.  So that in the following code when I click on button 2 I get an alert box with the value 2 displayed. </p>

<pre><code>&lt;ul&gt;
 &lt;li class="myclick" id="1"&gt;Test Me&lt;/li&gt;
 &lt;li class="myclick" id="2"&gt;Test Me 2&lt;/li&gt;
 &lt;li class="myclick" id="3"&gt;Test Me 3&lt;/li&gt;
</code></pre>

<p></p>

<pre><code> $.fn.myFunction = (function() {
          alert(this.id);
          });         
 $(function () {
       $(".myclick").click(function(){
                $().myfunction("Test");
      });
</code></pre>

<p>I know it's  a pretty basic question but I'm very much new at Jquery and am trying teach myself.</p>

<p>TIA</p>
