show('<div class="alignLeft"><div id="ownerinfo"></div><br /><h3>Where will the document go?</h3><select id="dest"><option value="">-- select destination --</option><option>'+this.DESTINATIONS.join('</option><option>')+'</option></select><h3>Notes</h3><input type="text" id="notes" size="70" /><p><button id="regbtn">Register</button></p></div>','append',function(){
$('#regbtn').click(function(){
alert('ok');
});
alert($('#regbtn').click);
});
The above is the code. show()
is just a function that adds animation but executes third parameter after animation. It works with other functions. However, the problem is in $('#regbtn').click()
-> I cannot seem to bind it. What could be the problem here?
I'm hoping that even if I don't upload the whole code you can help me figure it out. When i alert the .click
, this is the output:
function (a,c){c==null&&(c=a,a=null);return arguments.length>0?this.bind(b,a,c):this.trigger(b)}