1
Comment faire fonctionner ce code? Je ne vois pas comment je peux atteindre div
à partir de $.get
rappel.jquery: récupère l'élément parent de l'appel ajax
$("<div/>", {
text: "some text",
click: function (e) {
$.get("bar.php", function(data) {
$(this).text(data); // doesn't work
});
}
}).appendTo("body");