Javascript examples for jQuery Method and Property:deferred
Using jQuery maintaining Deferred functionality
<html> <head> <script src="https://code.jquery.com/jquery-latest.js"></script> </head> //from w ww . j ava 2s .c om <body> <script> var dfr = (function() { var deferred; deferred = jQuery.Deferred(); setTimeout(function() { return deferred.resolve(JSON.stringify("test")); }, 10); return deferred; })() dfr.then(console.log.bind(console)) </script> </body> </html>