How can I add an event (by Mootools) to an element just created via set("html")
, and inserted through the DOM?
$(document).addEvent("domready", function(){
$(someel).set("html", "<p class='someclass'></p>");
$$("someclass").somefn("click", function(){...});//somefn: that add the "click" event to the <p> element
});