I am having a bit of trouble with an app i am building for an iPhone using phonegap and jQuery. i have found several threads that have told me to use on function for content created dynamically. However, i cannot get the buttons to work correctly. The follownig code creates the buttons from a loop statement;
$("#question").append('<button class="next">ClickMe</buttons>');
The following code is my click function
$(".next").on("click", function(){
alert("working");
});
So far, there are 3 buttons created, but they do not produce the alert and i get no error messages. Can anyone help explain what i have done wrong?