I was playing with $.getJSON in the following way to receive an alert but without luck.
Here is the code,
<script type="text/javascript">
$(document).ready(function() {
var url = "ticker.js?callback=?";
$.getJSON(url, function(data) {
alert(data.price);
});
});
</script>
And the ticker.js file has only the following line
{ticket:'IBM',price:14.57}
It is supposed to get an alert "14.57" but I am not getting the alert.
If you would like to see it in action you may try the link, http://nazmulweb.com/site5/demo/jsonPtest/