title: Where is my jQuery error? Combing AJAX with a dropdown
body: <p>I am currently running the following AJAX function from a button with a class named '.decline'</p>
  
  <pre><code>$(function() {
      $(".decline").click(function(){
  
          var element = $(this);
          var del_id = element.attr("id1");
          var order_id = element.attr("data-order1");
          $.ajax({
              type: "POST",
              url: "decline.php",
              //data: info,
              data: {id1:del_id,order_id1:order_id},
              success: function(){cache: false}
          });
  
          $(this).parents(".show").animate({ backgroundColor: "#003" }, "slow").animate({ opacity: "hide" }, "slow");
      });
  });
  </code></pre>
  
  <p>This works as needed, but now I have added a dropdown to my button like this:</p>
  
  <pre><code>&lt;div id="dropdown-1" class="dropdown dropdown-tip"&gt;
      &lt;ul class="dropdown-menu"&gt;
          &lt;li&gt;&lt;a class="decline" href="#1" id1="&lt;?php echo $id1; ?&gt;" data-order1="&lt;?php echo $name; ?&gt;"&gt;Item One &lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#2"&gt;Item Two&lt;/a&gt;&lt;/li&gt;
          &lt;li&gt;&lt;a href="#3"&gt;Item three&lt;/a&gt;&lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and Ive changed the AJAX as follows (just the class that executes it)</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  $(function() {
  
      $(".decline a").click(function(){
          var element = $(this);
          var del_id = element.attr("id1");
          var order_id = element.attr("data-order1");
  
           $.ajax({
             type: "POST",
             url: "decline.php",
             //data: info,
             data: {id1:del_id,order_id1:order_id},
             success: function(){cache: false}
          });
  
          $(this).parents(".show").animate({ backgroundColor: "#003" }, "slow").animate({ opacity: "hide" }, "slow");
      });
  });
  
  &lt;/script&gt; 
  </code></pre>
  
  <p>My dropdown works as needed, but now I can no longer run my AJAX function. Id suspect its an issue with the class Ive assigned in the jQuery, but I cant track it down.</p>
  
  <p>Thanks!</p>