I have a system loading in a youtube video using an object tag with the id="cstmVideoContent" and the data=(youtube link). I need to extract the content in the object's data property using javascript/jquery and render it elsewhere on the page.
Here's my relevant html:
<object id="cstmVideoContent" width="400" height="320" type="application/x-shockwave-flash" data="NEED THE VIDEO LINK THAT IS HERE" style="visibility: visible;"></object>
Based on my admittedly crude knowledge of javascript/jquery, it seems like this should work:
var videolink = $('object#cstmVideoContent').attr('data');
But it is coming back as "undefined" every time. Is this method possible, am I doing something wrong, or is there a better way? Thanks!