I have a photos.php page that is getting called dynamically with the help of jquery load function as below :
$("#photo_gallery").load("./photos.php"
However I want a way to manually stop the loading of photos.php if the user clicks another button exactly after the above function call .
for example if the user clicks a button that triggers $("#photo_gallery").load("./photos.php") and after exact next moment,if the user clicks another button,then the above loading should immediately stopped.Appreciate if anyone can help me here.
$("#photo_gallery).empty() will not work here (it doesn't work while the php page loads,it only works when after/before the load)