29
May '17
jQuery getJSON Equivalent for Posting
Like me, you may find the jQuery $.getJSON function really useful for quick GET-based AJAX calls, and lament the lack of a corresponding POST function. Well here it is:
$.postJSON = function(url, data, func) { $.post(url, data, func, 'json'); }
You’re welcome!