title: jquery.Event of dynamic elements
body: <p>my code and my problem is:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function() {
    // this variable is used to set the dynamic elements
    tagFlag = '';
  
    $("#a1").click(function(event) {
        event.preventDefault();
        tagFlag = 'me';  // setting the element which I want to trigger later
    });
  
    $('#'+tagFlag).click(function(e) {
        // do sthing here
    });
  });
  
  &lt;/script&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;a href=""&gt;make the element&lt;/a&gt;
  &lt;p id="me"&gt;some words here&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>but.when I set the tagFlag,and click the "p" nothing is happen.BTW.there is error when tagFlag had been set nothing.So.How can I get what I want?</p>
  
  <p>Thank you very much!!</p>