index

JQuery Flyout

alternatives

resources

JQuery Flyout
an animated image viewing plugin

About JQuery Image Flyout Plugin

JQuery Flyout is a simple image viewing plugin with preloading capabilities I developed in 2008 for my own projects. The goal was to provide a simple, yet effective way to view normal image links without leaving the source page by using JQuery to preload the image, show a message or loading animation during that process, and finally explode or 'flyout' the image into full view using JQuery easing animations. Flyout is not your typical Lightbox plugin for JQuery. If you are looking for an image viewer with more features or a different viewing technique, check out the list of alternatives to the right.

Having said that, I do intend to continue adding new capabilities as I have the time. I really appreciate your reports and suggestions; several of the newer features have come from users like you, so please keep writing.

JQuery Flyout Features

Preloading
JQuery Flyout uses dynamic image preloading Javascript to load the image in the background without leaving the page. Just apply the Flyout plugin to whatever container of linked images on your page and JQuery flyout will do the rest. You can also specify loading text or a loading animation while the image is loading.
Easing Animations
All the native JQuery and Easing Library easing animations are supported, you can even apply a different animation and speed for both the flyout and flyback animations.
Calculated, Custom and Fullsize Viewing
JQuery Flyout automatically sizes your image to maximum size of the image or constrains the image to the size of the viewport, unless you use options like heightMargin and widthMargin, which adds extra margin limitations from the viewport, or use fullSizeImage which expands the image to fullsize despite the size of the viewport.
Fade in and out support
Using the new outOpacity and inOpacity, you can create subtle fading effects to display your images
Other features
  • use the loaderOpacity option to set the opacity of the preloader element.
  • use the startOffset, startHeight and startWidth settings to customize the starting location of the Flyout image to a different location on the page. This can be useful if your trigger link does not contain a thumbnail image and other effects.
  • proper positioning for large loader borders.
  • supports JQuery noConflict mode.
  • accurately calculates destination size including borders.

The latest version 1.2 of Flyout has been tested successfully with JQuery versions 1.5, 1.4.4, 1.3.2 and 1.2.6

JQuery Flyout Options

The following options can also be found at the head of the latest jquery.flyout.js file:

outSpeed (integer) - default: 1000

Speed of the flyout animation in milliseconds.

inSpeed (integer) - default: 400

Speed of the flyback animation in milliseconds.

outEase (string) - default: swing

Easing method for the flyout animation.

inEase (string) - default: swing

Easing method for the flyback animation.

loadingSrc (string) - default: '' (none)

Path to the image file to use while target image is being preloaded.

loadingText (string) - default: 'Loading...'

The text to display when preloading an image when loadingSrc is not present.

loader (string) - default: 'loader'

The ID assigned to the created flyout div element that contains the target content.

loaderZIndex (integer) - default: 500

The CSS z-index for the created flyout div element (see loader option above.)

loaderOpacity (float) - default: 0.5     new in 1.2

The starting CSS opacity to use for the created flyout div element (see loader option above.)

closeTip (string) - default: ' - Click here to close'

The hint text to append to the final target image alt and title tags.

widthMargin (integer) - default: 40

The left and right margin space to restrict the final flyout target image within the current viewport. This value is effectively divided between the left and right margin, i.e. 20px on the left and 20px on the right. Overridden by destElement option.

heightMargin (integer) - default: 40

The top and bottom margin space to restrict the final flyout target image within the current viewport. This value is effectively divided between the left and right margin, i.e. 20px on the top and 20px on the bottom. Overridden by destElement option.

destElement (string) - default: '' (none)

The destination element to fly the target image to on the same page; uses full CSS notation, e.g. div#container. Using this overrides heightMargin, widthMargin and fullSizeImage options.

destPadding (integer) - default: 10

The destination element to fly the target image to on the same page; uses full CSS notation, e.g. div#container. Using this overrides heightMargin, widthMargin and fullSizeImage options.

startOffsetX (integer) - default: 0

Horizontal offset in px to start the flyout animation at.

startOffsetY (integer) - default: 0

Vertical offset in px to start the flyout animation at.

startHeight (integer) - default: 0

Overrides starting height of flyout animation in px; uses thumb image height by default.

startWidth (integer) - default: 0

Overrides starting width of flyout animation in px; uses thumb image height by default.

flyOutStart (string) - default: '' (none)

Callback function to run at start of flyout animation.

flyOutFinish (string) - default: '' (none)

Callback function to run at end of flyout animation.

putAwayStart (string) - default: '' (none)

Callback function to run at start of flyback animation.

putAwayFinish (string) - default: '' (none)

Callback function to run at end of flyback animation.

inOpacity (float) - default: 1.0     new in 1.2

CSS opacity for the target flyout image and loader at start of the animation.

outOpacity (float) - default: 1.0     new in 1.2

CSS opacity for the target flyout image and loader at end of the animation.

fullSizeImage (boolean) - default: false     new in 1.2

When true, Flyout enlarges image to full size even if it extends beyond boundary of the viewport. Overridden by destElement option.

JQuery Flyout Tips