Submit your widget

New jQuery plugin: “Fly Off Page”

Created 8 years ago   Views 17440   downloads 2095    Author James
New jQuery plugin: “Fly Off Page”
View DemoDownload 45.4 KB
160
Share |

There is a new jQuery plugin, it’s called "Fly Off Page". It will take selected elements and make them fly (not literally) off the page in a random or pre-defined direction. Customizable options include duration (of the animation), direction, tween (extend animation) and ‘retainSpace’ which allows you to retain, disregard or animate-out the space that the specified element once took up.

Available options:

Duration: The amount of time (in milliseconds) over which the animation will run. For example:

$(elem).flyOffPage({
    duration: 400 // 400 milliseconds (0.4 seconds)
});

  • Direction: The selected element will fly off the page in this direction.
    • ‘top’, ‘right’, ‘btm’, ‘left’
    • ‘topLeft’, ‘topRight’, ‘btmLeft’, ‘btmRight’
    • ‘random’
  • Tween: You can add your own tweens to the animation. For example:
$(elem).flyOffPage({
    tween: {
        opacity: 0
    }
});

retainSpace: This can be set to true/false or an object which will be ran as an animation on the placeholder. For example:

$(elem).flyOffPage({
    retainSpace: {
        height: 0,
        width: 0
    }
});