http://api.jquery.com/jQuery.getJSON/
displays the syntax and available parameters of getJSON() as:
jQuery.getJSON( url [, data ] [, success(data, textStatus, jqXHR) ] )
I am learning how to use this method and all the tutorials I have come across use:
jQuery.getJSON( "http://path/to/file.php", function(my_results) {
// do something with the my_results variable
}
I have got this working, but, in my newbie mind, such an example veers off from the available parameters pretty early, the only consistency that I can see being the URL parameter. And a function() is added however it is not shown in the 'available parameters' example.
Could anyone provide an example of a getJSON() method implementation where all the available parameters are used, with annotation about what each parameter is doing?