How to add anything in <head> through jquery/javascript?

Jitendra Vyas picture Jitendra Vyas · Dec 14, 2009 · Viewed 231.7k times · Source

I'm working with a CMS, which prevents editing HTML source for <head> element.

For example I want to add the following above the <title> tag:

<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />

Answer

nickf picture nickf · Dec 14, 2009

You can select it and add to it as normal:

$('head').append('<link />');