Since the
jQuery.get
method returns a jqXHR object, which is derived from a Deferred object, we can attach a success callback using the
.done()
method.
<title>deferred.done demo</title>
<script src="https://code.jquery.com/jquery-3.7.0.js"></script>
$( "p" ).append( " 1 " );
$( "p" ).append( " 2 " );
$( "p" ).append( n + " 3 " + n );
.done( [ fn1, fn2 ], fn3, [ fn2, fn1 ] )
$( "p" ).append( n + " we're done." );
$( "button" ).on( "click", function() {
Web hosting by Digital Ocean
|
CDN by Fastly
|
Powered by WordPress