Adding a youtube popup video with Colorbox

Please look at the following examples for how you can embed popup video in your pages. 

Please note you need to remove the quotes " from the embed code, or otherwise make the HTML encoded so that it will work within a javascript string.

Find more customisations http://colorpowered.com/colorbox/


Usage

<p><a href="javascript:void jQuery.colorbox({html:'embed code here'})">link text or image</a></p>

Usage, as used around an image

<p><a href="javascript:void jQuery.colorbox({html:'embed code here'})"><img src="/images/somethumbnail.jpeg" width=150 height=100></a></p>

Usage as used for a simple URL on the last screen of the insert image wizard

URL:        javascript:void jQuery.colorbox({html:'embed code here',title:'Title of Video'})


Example code

<p><a href="javascript:void jQuery.colorbox({html:'<iframe width=420 height=315 src=http://www.youtube.com/embed/eh-0knDpn5g frameborder=0 allowfullscreen></iframe>'})">view popup video</a></p>

Demonstration link

view popup video

Index Previous Next