PD24 PD24 - 4 months ago 21x
jQuery Question

Adding a meta tag via jquery?

I need to add this meta-tag in the head section of the page as i need the page to force IE7.

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

I am using DNN 5.6

How can i do this?


$('head').append('<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> ');

Though I'm not certain it will have an affect as it will be generated after the page is loaded

-- edit --

If you want to add meta data tags for page description, use the SETTINGS of your DNN page to add Description and Keywords. Beyond that, the best way to go when modifying the HEAD is to dynamically inject your code into the HEAD via a third party module.

Found at http://www.dotnetnuke.com/Resources/Forums/forumid/7/threadid/298385/scope/posts.aspx

This may allow other meta tags, if you're lucky

-- edit 2 --

Additional HEAD tags can be placed into Page Settings > Advanced Settings > Page Header Tags.

Found at http://www.dotnetnuke.com/Resources/Forums/forumid/-1/postid/223250/scope/posts.aspx