JQuery textShake v0.2
JQuery plugin that provides some animations to show text
Watch the demo included in the repo
Requirements
- JQuery 1.7+
Usage
$(element).textShake(); // Default options
Available options.
$(element).textShake({ // Trims spaces and breaklines surrounding text trim_on_start: true, // ms between every letter is drawn letter_delay: 60, // Splits words longest than 8 char to avoid random char combinations // that may overflow your container <div> // to disable set to false split_words: 8, // Starts automatically autoplay: true, // Measures text container initially and fixes its height fix_heght: false, onComplete: function( obj ) { // Will be called on complete console.log(obj); } });
Launch effect programatically
// Start efect with autoplay set to false $(element).textShake({ autoplay: false });
Launch the effect callin .play()
on the element:
$(element).data('textShake').play();
This can be used to replay the effect again
Changelog
- 0.2 Small improvementents. trim_on_start param
- 0.1 Initial