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 |
Why is the block display style used for animations?
Explain data paremeter of jquery ajax method?
What are selectors in jquery?
Difference between document.ready() and body onload()?
what is the use of param() method in jquery .
Which are the fastest selectors in jquery? : jquery mobile
Why do we use jquery? : jquery mobile
Whether we need to add jQuery file in both Master and Content page?
How to load jQuery locally when CDN fails?
Mention the advantages of cdn? : jQuery Mobile
How to redirect to another page using jquery?
Can you please explain the difference between event.preventdefault and "return false"? : jquery mobile