works in 1.4.2
works in 1.4.2
Am a newbie to jQuery, this works in 1.4.2 but doesnt in 1.9.1
what should I change to make it run
<h1>Long-running request demo</h1>
<div id="progress">Progress not yet initialized</div>
<a href="http://jquery.com/">jQuery</a>
<script src="jquery.js"></script>
<script type="text/javascript">
function pollProgress() {
$.getJSON('/progress', function(data) {
if (data.progress === null) {
return;
}
$('#progress').text('progress: ' + data.progress + ' / ' + data.progresslimit);
setTimeout(pollProgress, 1000);
});
}
$(document).ready(function() {
pollProgress();
});
</script>