Javascript examples for jQuery Method and Property:ajax
Wait for image to be loaded after AJAX response
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> <script type="text/javascript" src="https://code.jquery.com/jquery-1.8.3.js"></script> <script type="text/javascript"> $(window).load(function(){/*from w w w. java2 s .co m*/ var newPicture = 'http://www.java2s.com/style/download.png'; $("#newPic").attr("src", newPicture).load(openCrop); function openCrop() { console.log('openCrop called'); } }); </script> </head> <body> <img id="newPic" src="http://www.java2s.com/style/demo/InternetExplorer.png"> </body> </html>