A simple text elements rotator plugin
Visit the project page for more information and usage examples!
Five simple steps to install and configure wordsRotator plugin
Include the last version of jQuery
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
Insert into your page's head tag:
<link rel="stylesheet" href="jquery.wordrotator.css">
<script src="jquery.wordrotator.js"></script>
Choose and build the CSS3 animation effects from Animate.css
<link rel="stylesheet" href="animate.css">
<p>An <span id="myWords"></span> a day keeps the doctor away</p>
<script type="text/javascript">
$(function () {
$("#myWords").wordsrotator({
words: ['apple', 'apricot', 'avocado']
});
});
</script>
$("#myWords").wordsrotator({
autoLoop: true, //auto rotate words
randomize: false, //show random entries from the words array
stopOnHover: false, //stop animation on hover
changeOnClick: false, //force animation run on click
animationIn: "flipInY", //css class for entrace animation
animationOut: "flipOutY", //css class for exit animation
speed: 2000, //delay in milliseconds between two words
words: ['apple', 'apricot', 'avocado'] //Array of words, it may contain HTML values
});
Wordsrotator is licensed under the MIT license.