Revision: 43381
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at March 23, 2011 04:19 by secretgspot
Initial Code
if ($('.autoupdate')[0]) { setInterval(function () { $.get(document.location, function (data) { $('.autoupdate').each(function () { var html = $(data).find('#' + $(this).id).html(); }); }); }, 10000); }​
Initial URL
Initial Description
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.
Initial Title
In-Page Element Updating/Refreshing
Initial Tags
Initial Language
jQuery