Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Dismiss template notices after a few seconds

@henrywright

Moderator

You could use the setTimeout() JavaScript method for that:

function delay() {
    id = window.setTimeout(rm, 500);
}
function rm() {
    // Remove the notice from the DOM.
    var e = document.getElementById("id_of_the_notice");
    e.parentElement.removeChild(e);
}

Note:

  • 500 (milliseconds) can be changed.
  • id_of_the_notice must be changed
Skip to toolbar