title: using 2 links to power one jquery ajax function
body: <pre><code>$('#link1').click(function() {
     $.ajax({
      url: 'index.php?do=link1',
      type: 'POST',
      success: function(data) {
        blahblah
      },
    });
  });
  </code></pre>
  
  <p>how would i make this more universal?</p>
  
  <p>i wish to have multiple links, going into one ajax call, but url changes using the id of the link that called it... (hope that makes sense)</p>
  
  <p>i.e</p>
  
  <pre><code>&lt;a href="#" id="ajax-doit1"&gt; one &lt;/a&gt; 
  &lt;a href="#" id="ajax-doit2"&gt; two &lt;/a&gt; 
  </code></pre>
  
  <p>if the id starts with "ajax-" then call ajax, and ajax changes the url depending on the part after "ajax-"
  so ajax-doit1 will have a url of index.php?do=doit1</p>
  
  <p>is this possible?</p>
  
  <p>sorry if silly question, new to jquery.</p>