Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
55
rated 0 times [  57] [ 2]  / answers: 1 / hits: 18700  / 12 Years ago, mon, november 19, 2012, 12:00:00

In jQuery you can do this:



$(meta[property='fb:app_id']).attr(content);


Which will give you the content attribute value from the meta-tag with property attribute fb:app_id.



How can I do this in plain ol' Javascript?



Thank you in advance. :-)



Kenneth


More From » jquery

 Answers
3
document.querySelector('meta[property~=fb:app_id][content]').content

[#81918] Saturday, November 17, 2012, 12 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
jazminkyrap

Total Points: 631
Total Questions: 89
Total Answers: 109

Location: Finland
Member since Fri, Oct 21, 2022
2 Years ago
;