title: click event not fired in dynamically generated <li>
body: <p>hi all i am generating  my ul and li as follow and want to fire click event but delegate(),on()and click() method do not work  only live() works well but live() is deprecated function so is there any other method that i can use help me pls ??/
  here <strong>"loadpage"</strong> is div present in my html code </p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
         $(document).ready(function() {
               $('#LoadPage').append('&lt;ul class="testul" id="list"&gt;');
                   for (var i = 1; i &lt; 5; i++) {
                     $('#list').append('&lt;li class="clicks" id="item'+i+'"&gt;&lt;/li&gt;');
                   }          
               $('#LoadPage').append('&lt;/ul&gt;');
          });
  
              // click event works  wtih .live() onlyyy.......................
          $('.clicks').live('click', function() {
              alert('hello');
          });
  
  
  
  
  
  
          /*$(".clicks").on("click", function(){
              alert('hello');
          });
          $("#testul").delegate("li", "click", function() {
          alert('hello');
          });
  
  
  
          $("#testul").delegate("li", "click", function() {
              alert('hello');
                });*/
  
      &lt;/script&gt;
  </code></pre>