O'Reilly logo

jQuery for Designers Beginner's Guide by Natalie MacLees

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action — showing a video in a lightbox

Follow these steps to set up Colorbox to play a set of videos:

  1. We'll get started as we usually do, by setting up a basic HTML file and associated files and folders, just like we did in Chapter 1, Designer, Meet jQuery. In the body of our HTML document, we're going to include a link to a YouTube video:
    <p><a href="http://www.youtube.com/embed/2_HXUhShhmY?autoplay=1" id="video-link">Watch the video</a></p>
    

    Note a couple of things about my video link. First, I'm using the embed URL for the video rather than the link to YouTube's video page. For users without JavaScript enabled, this will take them to a stand-alone video player page on YouTube's site. For users with JavaScript enabled, it will ensure that ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required