Youtube video not opening in lightbox

Hi i am using prettyphoto media plugin in wordpress to display my youtube videos in a lightbox.
I have three, and I posted each one as different youtube video. Using prettyphoto the 1st post displays the video in lightbox. But other two don’t open in the lightbox and just redirect to the youtube page.

Below one works perfectly

Read More
<a class="slid-img"  href="http://www.youtube.com/watch?feature=player_embedded" rel="prettyPhoto"><img src="http://code/wp-content/uploads/2013/02/video1.png" alt="video1" width="412" height="323" class="alignnone size-full wp-image-731" /></a>

Below two doesn’t work with lightbox

<a class="slid-img" href="http://www.youtube.com/watch?v=k4QO"  rel="prettyPhoto"><img src="http://code/wp-content/uploads/2013/02/video2.png" alt="video3" width="411" height="324" class="alignnone size-full wp-image-732" /></a>

<a class="slid-img" href="http://www.youtube.com/watch?feature=player_embedded"  rel="prettyPhoto" ><img src="http://code/wp-content/uploads/2013/02/video1.png" alt="video2" width="412" height="323" class="alignnone size-full wp-image-731" /></a>

Can any one tell me how to make it work?

All the videos are set in slider.
Other Problem is 1st video opens in fancybox only in the first round of the slider after that video doesn’t open in fancybox

Related posts

Leave a Reply

1 comment

  1. Here are some basic troubleshooting steps for your situation:

    Have you tried non-youtube content in your PrettyPhoto? Try some — like images that are loaded from WordPress. If images don’t work either, you likely have an error somewhere in your javascript that is tripped when you first call PrettyPhoto. Look carefully through the javascript that is generated by the plugin — most likely the javascript in the head of your wordpress page.

    Otherwise, a likely conflict with PrettyPhoto is JetPack. If you have this plugin installed and enabled, try disabling it first.

    If you don’t notice anything better, try disabling all wordpress plugins except for PrettyPhoto. If it still doesn’t work properly, try reverting to the default wordpress theme, like 2010.

    If none of these is the problem, it could be the version of jQuery you are running. I think PrettyPhoto is compatible up to only jQuery 1.6.1.

    Another thing to check is to make sure you are only loading one copy of jQuery. Look through the generated source code of your wordpress page, and see if there is more than one reference to jquery.