How to add something right before the closing </head> tag using jQuery?
7 answers
Firstly, the element you are trying to add is not valid HTML, it is just a closing tag for the title and apparently already exists in the document. Secondly, you should not use appendTo in this case, but rather append :
$('head').append("<meta http-equiv='refresh' content='0;url=http://google.com'>"); Thirdly, there is no reason to do this because you can just as easily change the location using javascript.
window.location = "http://google.com"; +8