title: How to get element Id from dynamically generated form elements with jquery?
body: <p>To try the concept, I'm doing a very simple test.</p>
  
  <p>I got a form with some text input showing up from the start.
  When I click on a field, I want to capture its Id, and add a value to the input text.</p>
  
  <pre><code>$(document).ready(function() {
      $('input').focus(function() {
          var currentId = $(this).attr('id');
         $("#"+currentId).val('blah');
      });
  });
  </code></pre>
  
  <p>This works great with the initial fields, but it stops working with the fields added using ajax calls.</p>
  
  <p>The trick is, users are able to click on any field and I don't know which until they click.
  My Ids looks like this:</p>
  
  <pre><code>experience0-CompanyName //(original one)
  experience[n]-CompanyName
  </code></pre>
  
  <p>(the [n] part is also used to order the fields in the form as elements are grouped by experience, education skills etc...</p>
  
  <p>how can I achieve this?</p>