Forums

Adding Fancybox w/out WP Plugin (1 post)

  1. baileyspace
    Member
    Posted 9 months ago #

    I need to use fancybox to play a vimeo video as an iframe pop up on a static page. The Fancybox plugin doesn't seem to do this, so I'm trying to add the necessary code in the header.php file.

    As of now, I can get the video to play, but it's coming up inline instead of in the iframe.

    The header code looks like this:

    <?php wp_enqueue_script( 'fancybox', '/wp-includes/js/fancybox/fancybox/jquery.fancybox-1.3.4.js' );?>

    And this is what I have in the page itself:

    <a class="iframe" href="javascript:;">
    <img src="<?php bloginfo('template_url'); ?>/images/play_button.png" id="trailer" alt="Play trailer" title="Play trailer"></a>
    
    <!-- Trailer Script -->
    
    <script language="text/javascript">
      $("#trailer").fancybox({
    	'padding'		: 0,
    	'autoScale'		: false,
    	'transitionIn'	: 'none',
    	'transitionOut'	: 'none',
    	'width'			: 768,
    	'height'		: 432,
    	'href'			: 'http://vimeo.com/moogaloop.swf?clip_id=21461102&server=vimeo.com&show_title=1&show_byline=0&show_portrait=0&color=ff9933&fullscreen=1&autoplay=1&loop=0',
    	'type'			: 'swf',
    	'overlayColor'  : '#000'
    				});
    </script>

    Any ideas on what I'm missing?

Reply

You must log in to post.

About this Topic