I got a question in theory... I'm currently at work and can't try it..
If I have the following code :
stuff = '<button onclick="alert(' + "'Test');" + 'my Button</button>'; $("container").html(stuff); When I click on my new button, will my script work? And will my button be added?
I didn't get any result on JsFiddle...
$("container").replaceAll($("<button>my Button</button>").click(function () { alert("Test"); }));>.