title: The mouseEvent in a function fires twice if call again?
body: <p>The problem is I would like to fire only once when the mouseevent function is triggered, e.g.</p>
  
  <pre><code> $(document).ready(function() {
       $("#menu").click(function(){
           $('#menu_div').show();
           menu_function();
       });
  
  
       $("#menu_close").click(function(){
           $('#menu_div').hide();
       });
   });
  
  function menu_function(){
      $(".select_li").live(
          "click",
          function() {
              alert("test");
          }
      );
  }
  </code></pre>
  
  <p>The example has two objects, menu and menu close; when the menu press, the ui box is shown, and run the menu_function , which fires an alert test message. The problem is when the menu_close is clicked and box closed, and open it again, the alert test will fire twice. I observe that the times of div box close and open again is the same as the fire times of the function, how can I fix it?</p>
  
  <p>If I would like not using unbind, are there any better solution?</p>