I’m completely new to jQuery/javascript and have been beating my head against this simple task for days.
I want to find a meta element in a page with attribute property="og:title", and then get the value of the attribute "content", e.g.:
<meta property="og:title" content="Leaders Say Progress Made in Dealing With Euro Crisis"/>
so I want to get the text “Leaders Say Progress Made in Dealing With Euro Crisis”, and perhaps write it within in the page or pass it to another function.
How would I get the value of the content attribute? I tried .$("meta [property='og:title']") but then I realized that would try to get the non-existent text element.
Try