Hello,
Actually I am using Ajax in my wordpress site. The thing is when i open a post having a youtube video using ajax the video doesn't appear.
So what i want is, I want a reload code or a code which will reload the youtube video after the page loads using jQuery.
The script that i use to post youtube videos in my site is
Code:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js">
var params = { allowScriptAccess: "always", wmode: "transparent" };
swfobject.embedSWF("' . htmlentities('http://www.youtube.com/embed/'.$atts['id'].'?enablejsapi=1&version=3&playerapiid='.$uuid.'&rel=0&controls=1&showinfo=1') . '", "'.$uuid.'", "'.$width.'", "'.$height.'", "9.0.0", null, null, params);
</script>
<div id="cp_container" class="cp_youtube">
<div id="'.$uuid.'"></div>
</div>
I could have used iframe, but because the swfobject in the script above is linked with another function, i can not replace it.
I am using the plugins Advanced Ajax Page loader and the Youtube Module of Cubepoints.