Javascript – jquery wait cursor while loading html in div


I want to show to the user a state that the result is loading.
How can I change cursor or gif while loading result in div with $MyDiv.load("page.php") ?

Best Solution

$("body").css("cursor", "progress");

Just remember to return it afterwards:

$MyDiv.load("page.php", function () {
    // this is the callback function, called after the load is finished.
    $("body").css("cursor", "auto");