Hi. I make this code that, after 9 seconds, it call an ajax function, and print the result elaborated from the server to the client.
This is the JS code :
function changeSponsor() {
$.ajax({
type: 'POST',
cache: false,
url: './auth/ajax.php',
data: 'id=changespon',
success: function(msg) {
$('.menusponsor').hide().fadeIn(1000).html(msg);
}
});
}
$(document).ready(function() {
x=window.setInterval("changeSponsor()", 9000);
});
the result is printed on a div at the top of the page. when the result is printed to the client (after, as said, 9 seconds), and I am at the bottom of the page, the page go automatically at the top. I don't want this.
You can see an exemple at this link : open this page, go to the bottom (is not so long this page) and after few seconds (9). You will se the page scroll at the top.
How can resolve this problem? Cheers