This question already has answers here:
</div>
</div>
<div class="grid--cell mb0 mt4">
<a href="/questions/14220321/how-do-i-return-the-response-from-an-asynchronous-call" dir="ltr">How do I return the response from an asynchronous call?</a>
<span class="question-originals-answer-count">
(38 answers)
</span>
</div>
<div class="grid--cell mb0 mt8">Closed <span title="2014-03-29 23:10:45Z" class="relativetime">6 years ago</span>.</div>
</div>
</aside>
How can I save the return of the JQuery AJAX load() function in a variable? For example var temp="";
$("#div1").load("demo_test.txt #p1");
So instead of saving the return in div1, I want to save it in the variable temp.
Thank you
</div>