link doesn't work from placed html (scope?)
Clicking button1 works. Button2, which is placed by clicking a div doesn't work. Is this a scope-problem?
Is there a workaround for this?
thanks, Albert
-
$(".OK_button1").click(function() {
alert("OK_button1 clicked");
});
$(".OK_button2").click(function() {
alert("OK_button1 clicked");
});
$("#clickdiv").click(function() {
$("#clickdiv").html("<form><input type='submit' value='OK_button2' class='OK_button2'/></form>")
});
});
-
<input type="submit" value="OK_button1" class="OK_button1"/>
</form>
<div id="clickdiv">click for button2</div>