Is there any advantage of using $.ajax() for ajax call against $.get() or $.post()?



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

Post New Answer

More jQuery Interview Questions

Difference between detach and remove? : jQuery Mobile

0 Answers  


what does $("div") will select? : jquery mobile

0 Answers  


Explain the use of the $.fn.bind and $.fn.trigger.

0 Answers  


How can you disable jquery animation?

0 Answers  


What is .siblings() method in jquery?

0 Answers  






differentiate between bind() vs live() vs delegate() methods in jquery.

0 Answers  


Explain cache paremeter of jquery ajax method?

0 Answers  


How to divide a page into parts using jquery mobile? : jquery mobile

0 Answers  


Is it too early to discuss jquery ui 1.8?

0 Answers  


What is the difference between the knockout and jquery?

0 Answers  


What is the purpose of jquery?

0 Answers  


How we can hide a block of html code on a button click using jquery?

0 Answers  


Categories