Apply Jquery to generated content
<p>Hoping someone can point me in the right direction.</p>

<p>I've got this code:</p>

<pre><code>//nextButton processing
    $('.nextButton').on("click", function(){
    //$('.nextButton').click(function(){

         var querystring = $("#formStep").serialize() + "&amp;step=" + step + "&amp;session=" + session;
        // Ajax Call
        $.ajax({
                type: "POST",
                data: querystring,
                url: "includes/processnext.php",
                dataType: 'json',
                success: function(msg){
                    $('.result').append(msg.answerRow);

                }
            });

  // End Ajax Call
    });
</code></pre>

<p>Now this works for the first .nextbutton on there, but the ajax result replaces it with a next next button.</p>

<p>To fix this i tried using the Jquery .on() (old code commented out) but that doesn't seem to have solved it either.</p>

<p>Any suggestions?</p>

<p>Thanks.</p>
