I used $("#header").load("index.html #header");
to load a div with the id "header" from index.html and used it in another page, named current.html, to display the same div.
In my header div on index.html (the original div), there was an element <a>
with id "about". Now, after copying, I want to change the class of the "about" <a>
tag. However, when I used document.getElementById("about").className="active"
, it returned null because this div was copied.
Can anyone help?