i'm creating that script if someone delete the text or link on footer of my template it will redirect to my site, but its redirecting without removing anything.
function loadBody() {
var elem = document.getElementById("mycontent");
if(elem.innerHTML !== "MySite" || elem.href !== "http://mysite.com")
window.location="mysite.com";
}
here is the footer html
<div id='mycontent'>
<p>© Template is designed by <a href='http://mysite.com' title=''>Mysite</a></p>
</div>
thanks in advance.