Check out this code snippet I have:
var _07votes = $("#07votes");
$(document).ready(function() {
setInterval(function() {
$.ajax({
url: "http://services.runescape.com/m=poll/retro_ajax_result?callback=?",
method: "GET",
contentType: "application/json",
dataType: "jsonp",
timeout: 10000;
}).done(function(data){
if (data.votes > 0) {
_07votes.text("" + data.votes);
}
});
}, 3000);
});
I'm having trouble getting this Ajax code to function properly, it seems like it's not executing the query. Any ideas why this might be happening?