I would like to understand how jquery handles context. I have this code:
var formHtml;
jQuery.get("form2.htm", function (data) {
formHtml = data;
});
alert(formHtml);
What it does, it gets data from the form2.html
page and I am setting the formHtml variable to that data so that I can use it somewhere else but when I alert that I get undefined. Is there something I am missing?