O'Reilly logo

Instant Fancybox by Kyle Diedrick

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

Customizing other helpers (Intermediate)

The image title and transparent overlay are also Fancybox helpers. Unlike the other helpers that we have been working with, these are included in the default application. Each of these helpers has a few settings that we can use.

Getting ready

The title has only one setting, the type setting. The type setting of the title determines where it positions on the image. The overlay has five settings: closeClick, speedOut, showEarly, css, and locked. We will adjust all of these settings to see how it impacts the functionality of Fancybox.

How to do it...

  1. Change the title helper's type setting to be over.
    $('.fancybox').fancybox({
      helpers: {
        title: {
          type: 'over'
        }
      }
    });

    The type setting for the title can also be float ...

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