layervault / jquery.text.fadeto.js

jQuery library for fading text elements using CSS3 transitions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Usage

Fade a selection of text to another selection of text using CSS3 transitions, but invoked via JavaScript.

$('h1').fadeTo("New Title");

You can also give it a few options:

$('h2').fadeTo("New Subheading", {
  fadeInLength: 1000,
  fadeOutLength: 2000,
  fadeInEasing: 'ease-in',
  fadeOutEasing: 'ease-out'
});

Or event a callback:

$('h2').fadeTo("New Subheading", function () {
  alert("We're done!");
});

Installation

Just include jquery.text.fadeto.js as a script tag on the page. Bonus points for incorporating it into your asset pipeline.

About

jquery.text.fadeto.js was originally developed for LayerVault by Kelly Sutton.

You can see more projects from LayerVault in the LayerVault Cosmos.

About

jQuery library for fading text elements using CSS3 transitions


Languages

Language:JavaScript 100.0%