I am trying to use prettyPhoto for jQuery to add videos to my site.
I added the jQuery source code and the place prettyPhoto js in my head to the end of the body tag, and also added initialization code (as the documentation says).
<script type="text/javascript" charset="utf-8"> $(document).ready(function(){ $("a[rel^='prettyPhoto']").prettyPhoto(); }); </script>
In my HTML, this is what I wrote because I wanted the video to show too, but when someone clicks on it, the video should open as a lightbox.
<div id="video_player"> <a href="#" rel="prettyPhoto"> <iframe width="640" height="350" src="http://www.youtube.com/embed/cH6kxtzovew" frameborder="0" allowfullscreen></iframe> </a> </div>
But it does not work. How to do it?
James
source share