• Hi,

    I found this code to use the prettyPhoto plugin with Post Images:

    <script type="text/javascript">
    $(document).ready(function(){
    	$('.postclassname a').has('img').attr('rel', 'prettyPhoto[]');
    });
    </script>

    It works great with images, but when there is an embedded Youtube video in the post, it gets included in the ‘playlist’ of prettyPhoto, and I get the error “Image cannot be loaded”. Is there a way to exclude embedded video’s?

    Thanks, Peter

    https://www.ads-software.com/plugins/prettyphoto/

Viewing 1 replies (of 1 total)
  • Thread Starter ptrv

    (@ptrv)

    It’s more a jquery question I believe. What would the syntax be to prevent the embedded video
    <iframe src="https://www.youtube.com/embed/xxxxxxx?feature=oembed"></iframe>
    which apperently contains an image (‘img’) from getting the rel=prettyPhoto[]?

Viewing 1 replies (of 1 total)
  • The topic ‘Problem with embedded video’ is closed to new replies.