title: Jquery- .each() doesn't work
body: <p>I have these buttons in my form that i want to bind 'mouseenter' and 'mouseleave' events to them this is the code that i wrote</p>
  
  <pre><code>$("button").each(function() {
    $(this).bind("mouseenter", function() { $(this).css("border", "1px gray outset") });
    $(this).bind("mouseleave", function() { $(this).css("border", "none") });
   });
  </code></pre>
  
  <p>this code only works on the first button and nothing happens to the rest.
  this is my full code:</p>
  
  <pre><code> $("button").each(function() {
   $(this).hover(function() { $(this).css("border", "1px gray outset") }, function() {   $(this).css("border", "none") });
      $(this).bind("mousedown",$(this).css( "border", "inset"));
      $(this).click(DoSubmit($(this), 'CLICK', ''));
      });
  </code></pre>