[Solved] How to Refresh a DIV every X Seconds [closed]


If your advert isn’t random, and it’s just refreshing the div contents (maybe due to the content being a video), then you can use jQuery in this way:

$(document).ready(function()
{
    function refresh()
    {
        var div = $('#target-div'),
            divHtml = div.html();

        div.html(divHtml);
    }

    setInterval(function()
    {
        refresh()
    }, 300000); //300000 is 5minutes in ms
})

this will refresh div contents every 5 minutes.

refs:

https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout

https://api.jquery.com/Html/

3

solved How to Refresh a DIV every X Seconds [closed]