How can you update an 'onclick' event in jquery?
<p>I have a <a href="http://jsfiddle.net/rayd360/yjAeS/1/" rel="nofollow">JSFiddle</a> that seems like it should work but it doesn't.</p>

<pre><code>function copyform(curnum){
    if(curnum == 3) $('p').html('Thank You!')
    var num = $('form').length;
    var newNum  = new Number(num + 1);

    // create the new element via clone(), and manipulate its ID using newNum value
    var newElem = $('#form'+curnum).clone().attr('id', 'form' + newNum);

    //
    //this is where I need to update the onclick to copyform('+newNum+')
    $('#form'+newNum+' input').attr('onclick', 'copyform('+newNum+')');

    // insert the new element after the last "duplicatable" input field
    $('form').after(newElem);

}
</code></pre>

<p>I just need help implementing the <code>onclick</code> function. This is part of a larger more complex program that would be a hard example to show. Any and all help is much appreciated!</p>
