Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
135
rated 0 times [  142] [ 7]  / answers: 1 / hits: 20323  / 12 Years ago, wed, october 10, 2012, 12:00:00

I need to add a meta tag (specfically, <meta name=apple-itunes-app content=app-id=xxxxx>) to a certain page, but the way our templates are set up, it's not possible for me to edit the code for the HEAD tag directly (for corporate, not technical, reasons).



Therefore, is there a way using JQuery within the BODY tag to add this meta tag?


More From » jquery

 Answers
337

Maybe you can try this:



jQuery:



$('head').append('<meta name=apple-itunes-app content=app-id=xxxxx>');


Javascript:



document.getElementsByTagName('head')[0].appendChild('<meta name=apple-itunes-app content=app-id=xxxxx>');

[#82630] Tuesday, October 9, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dominiqued

Total Points: 189
Total Questions: 122
Total Answers: 103

Location: Ghana
Member since Sun, Mar 27, 2022
2 Years ago
;