title: jQuery 1.5.0 to 1.5.1 breaks previous script
body: <p>I needed to update my jQuery library for some bugs that IE9 has with &lt;= v1.5.0.  Upgrading the library to 1.5.1+ (even at current 1.6.4) breaks some script that I have on the page, though... (so of course, fix one issue, cause another)...</p>
  
  <p>The script allows the user to add and subtract a group of input boxes (so, if they want to input a single line item, they do just that... but they can add unlimited amount of additional line items).</p>
  
  <pre><code>//ADDS ANOTHER USER
  $(".add-user").click(function() {
      onemore = $("#userSelectBoxes").clone();
      onemore.find(":input").each(function() {
          $(this).val("");
      });
  
      $("#user_block &gt; #userSelectBoxes:last").after(onemore);
      set_add_del();
      return false;
  });
  
  $(".removeable").click(function() {
      $(this).parent().remove();
      set_add_del();
      return false;
  });
  
  function set_add_del() {
      $('.remove_cat').show();
      $('.add_cat').hide();
      $('.add_cat:last').show();
      $("#user_block &gt; #userSelectBoxes:only-child &gt; .remove_cat").hide();
  }
  </code></pre>
  
  <p>The add and remove buttons, in the HTML are as follows (and they just add another DIV of input fields basically):</p>
  
  <pre><code>&lt;a href="#" class="remove_cat removeable"&gt;-&lt;/a&gt;
  &lt;a href="#" class="add_cat add-user"&gt;+&lt;/a&gt;
  </code></pre>
  
  <p>So with 1.5.0 - this would work properly, and let me click + or - unlimited amount of times and always function.  With 1.5.1+, I can click the + ONCE, then nothing else works (adding OR deleting).</p>
  
  <p>Any ideas?  Hopefully I included all that would be needed here...</p>
  
  <p><strong>UPDATE 9/27/11 @ 5:05 PM EST</strong>
  I followed the suggestions in the comments below.  No luck.  It actually performs exactly the same...</p>
  
  <p>I should note that when I click for the 2nd time, not only does it no work (as I stated earlier), but it will pop me back up to the top of the screen as well.</p>
  
  <p>Here is the latest code...</p>
  
  <pre><code>$(".add-user").click(function(){
                  onemore = $(".userSelectBoxes").first().clone();                
  
                  onemore.find(":input").each(function(){
                      $(this).val("");
                  });
  
                  $("#user_block &gt; .userSelectBoxes:last").after(onemore);
                  set_add_del();
  
                  return false;
              });
  
              $(".removeable").click(function(){
                  $(this).parent().remove();
                  set_add_del();
                  return false;
              });
  
              function set_add_del(){
              $('.remove_cat').show();
              $('.add_cat').hide();
              $('.add_cat:last').show();
              $("#user_block &gt; .userSelectBoxes:only-child &gt; .remove_cat").hide();
              }
  </code></pre>