Is there any advantage of using $.ajax() for ajax call against $.get() or $.post()?
Answer / chaitanya
By using jQuery post()/ jQuery get(), you always trust the response from the server and you believe it is going to be successful all the time. Well, it is certainly not a good idea to trust the response. As there can be n number of reason which may lead to failure of response.
Where jQuery.ajax() is jQuery's low-level AJAX implementation. $.get and $.post are higher-level abstractions that are often easier to understand and use, but don't offer as much functionality (such as error callbacks). Find out more here.
| Is This Answer Correct ? | 2 Yes | 0 No |
Is jQuery is a JavaScript or JSON library file?
Is jquery still relevant 2019?
What are the types of selectors that are used in jquery? Give examples.
How is body onload() function is different from document.ready() function used in jquery?
Explain the use of the .pushstack() method.
What are the types of selectors in jQuery?
Is jQuery replacement of Java Script?
How to select class in jquery?
What is the use of param() method?
What is chaining in jQuery?
How is the deferred method in jquery important in relation to animate method?
List the basic selectors in jquery?