Javascript examples for jQuery:Json
JQuery promise with getJSON and callback
<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 ww . ja va2 s . c om*/ $.getJSON("/echo/json").success(function(data) { console.log("first: " + new Date().getTime()); }).then(function() { console.log("second:" + new Date().getTime()) }); }); </script> </head> <body> </body> </html>