title: How to call jQuery function in HTML returned by AJAX
body: <p>I've a page in which I've posts and users are to give comments. The comments are handled using AJAX. Each comment line has a "Vote" button.</p>
  
  <p>In the index page, I've put the jQuery function for the vote</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(function()    {
           $('.voteUpBtn').click(function() {
                 // Cast your vote
            }
       }
  &lt;/script&gt;
  </code></pre>
  
  <p>Now when a user submits a new comment, it makes an AJAX call and appends the HTML using jQuery to the index page</p>
  
  <pre><code>$.ajax({
          type: "POST",
          url: "proc/add-line.php",
          data: dataString,
  
          cache: false,
          success: function(html){
              $("ul#nextLines").append(html);
          }
      });
  </code></pre>
  
  <p>On the appended HTML, I have the same vote button. (Each comment has a corresponding vote button).</p>
  
  <p>The Problem is, the "vote" button on the new comment generated by AJAX doesn't work. If I refreshed the page, the vote works (although I'm using the same Markup).</p>
  
  <p>How do I make it possible for the vote button to work in the AJAX returned HTML??</p>