title: how to change/edit value of label with jquery/javascript?
body: <p>i have a standart html label with value:</p>
  
  <pre><code>&lt;label id="telefon" value="101"&gt;&lt;/label&gt;
  </code></pre>
  
  <p>i like to edit this value by clicking on the label and enter on the appeared textbox new value (like <code>value="202"</code>).</p>
  
  <p>how can i do such a tricky thing?</p>
  
  <p>i tried it with JQuery function, but it really dont wont to work:</p>
  
  <pre><code>$(function() {
  
    $('a.edit').on("click", function(e) {
      e.preventDefault();
      var dad = $(this).parent().parent();
      var lbl = dad.find('label');
      lbl.hide();
      dad.find('input[type="text"]').val(lbl.text()).show().focus();
    });
  
    $('input[type=text]').focusout(function() {
      var dad = $(this).parent();
      $(this).hide();
      dad.find('label').text(this.value).show();
    });
  
  });
  </code></pre>