Since the jQuery.get
method returns a jqXHR object, which is derived from a Deferred, you can attach a success and failure callback using the deferred.done()
and deferred.fail()
methods.
1
2
3
4
5
6
7
|
|