/ Published in: jQuery
Essentially it refreshes the content of any element in the page that has the “autoupdate†class on it. It uses the jQuery AJAX load method to get the page and replaces all the content within the new content from their matching IDs.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
if ($('.autoupdate')[0]) { setInterval(function () { $.get(document.location, function (data) { $('.autoupdate').each(function () { var html = $(data).find('#' + $(this).id).html(); }); }); }, 10000); }​