title: Find href value based on name attribute of link
body: <p>I have two types of links in my webpage:</p>
  
  <pre><code>&lt;div id="mybookings"&gt;
  &lt;a name="type1ID" href="4007" class="booking-deleteDraft"&gt;Delete Me&lt;/a&gt;
  &lt;a name="type2ID" href="9001" class="booking-deleteDraft"&gt;Delete Me&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I am writing an ajax submit and need to include the correct data in the POST. How do I ask JQuery to do the following:</p>
  
  <pre><code>    $("#mybookings").on('click', '.booking-deleteDraft', function (e) {
      e.preventDefault();
       data: {
               Type1ID: $(this).attr("href").val() // This gets the value of the href, but it should only get it where the name attribute is "type1"
               Type2ID:  $(this).attr("href").val() // This gets the value of the href, but it should only get it where the name attribute is "type2"
             },
  .....
  </code></pre>
  
  <p>How do I get the the correct values into the Type1ID and Type2ID parameters?</p>