Hi I am trying to update the innerHTML of following script
See the comments inline:
// Run when document is completely rendered and is ready to be manipulated
document.addEventListener("DOMContentLoaded", function () {
document.querySelector("#global-alert-queue .animate-in").innerHTML = "Change Text";
});
Demo: http://jsfiddle.net/tusharj/kg3cc4gw/3/
querySelector
Returns the first element within the document (using depth-first pre-order traversal of the document's nodes) that matches the specified group of selectors.
More on querySelector
: https://developer.mozilla.org/en-US/docs/Web/API/Document/querySelector