title: Jquery: delegate and this
body: <p>Having a such jQuery snipplet, I really need to improve the quality:</p>
  
  <pre><code>$foo.focus(function() {
      if (!user_input)
      {
          jQuery(this).val('');
          user_input = true;
      }
      else
      {
          jQuery(this).live("mouseup", function () {
              $(this).select();
          });
      }
  })
  </code></pre>
  
  <p>How can I change <strong>live</strong> part to <strong>delegate</strong> ? I'm confused about the part about pointing to a parent element.  </p>