im trying to access database of twitter using json and jquery(only public tweets). I wrote a function. Here it is:
$(document).ready(function(){
alert("1");
$("button").click (function(){
alert("2");
$.getJSON("http://search.twitter.com/search.json?q=messi", function(data){
alert("3");
});
alert("4");
});
} after page is loaded an alert appears and says 1, as expected. when i click the button two alerts appear and say 2, 4 respectively. It seems there is a problem with getJSON function i could not solve it.