title: Passing data to a jQuery click() function
body: <p>I have a simple span like so</p>
  
  <pre><code>&lt;span class="action removeAction"&gt;Remove&lt;/span&gt;
  </code></pre>
  
  <p>This span is within a table, each row has a remove span.</p>
  
  <p>And then I call a URL using AJAX when that span is clicked. The AJAX event needs to know the ID of the object for that row? What is the best way of getting that ID into the click function?</p>
  
  <p>I thought I could do something like this</p>
  
  <pre><code>&lt;span class="action removeAction" id="1"&gt;Remove&lt;/span&gt;
  </code></pre>
  
  <p>But an ID should not start with a number? Right? Then I thought I could do</p>
  
  <pre><code>&lt;span class="action removeAction" id="my1"&gt;Remove&lt;/span&gt;
  </code></pre>
  
  <p>Then just strip the 'my' part from the ID, but that just seems Yuk!</p>
  
  <p>Below is my click event and where my AJAX event is.</p>
  
  <pre><code>&lt;script type="text/javascript" language="text/javascript"&gt;
  
  $(document).ready(function()
  {
  
      $(".removeAction").click(function()
      {
          //AJAX here that needs to know the ID            
      }
  });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I am sure there is a nice way of doing this?</p>
  
  <p>Note: I am not looking for</p>
  
  <pre><code>$(this).attr("id");
  </code></pre>
  
  <p>I want to be able to pass more than one piece of information</p>
  
  <p>Thanks. Jake.</p>