Giter VIP home page Giter VIP logo

wordmagik's Introduction

WordMagik

A simple event based word animation plugin using jQuery and CSS animations. This plugin is inspired by WordsRotator Plugin by Andrea Pace. I required a similar functionality to wordsrotator but based on events so I wrote WordMagik.

Dependencies

Installation and Usage

1. Include jQuery to your project

<head>
	<!-- Javascript Files -->
	<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>

2. Include your build of Animate.css

<head>
	<!-- CSS Stylesheets -->
	<link rel="stylesheet" type="text/css" href="https://rawgit.com/daneden/animate.css/master/animate.min.css" />

	<!-- Javascript Files -->
	<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
</head>

3. Add WordMagik JS and CSS

<head>
	<!-- CSS Stylesheets -->
	<link rel="stylesheet" type="text/css" href="https://rawgit.com/daneden/animate.css/master/animate.min.css" />
	<link rel="stylesheet" type="text/css" href="css/wordmagik.animate.min.css" />

	<!-- Javascript Files -->
	<script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"></script>
	<script type="text/javascript" src="js/jquery.wordmagik.min.js"></script>
</head>

4. Initialize the plugin

<script type="text/javascript">
	$(document).ready(function() {
		$(".the-word").wordmagik({
			wordList: ["Awesome", "Cute", "Sexy", "Hot", "Swagging", "Perfect"],
			eventSelector: "#changeWord",
			onEvent: "click"
		});
	});
</script>

Options

1. randomize

A boolean of whether to pickup random words from the list or not. This is set to true by default. Setting this to false will use words indexwise.

2. wordList

An array of words. Words could be plain text or even HTML.

3. eventSelector

A selector to which the change word method will be bound. Example button.change-word, .change, #change, etc.

4. onEvent

An event on which the change word method will be called. Example hover, click etc.

5. animationIn

Type of animation for the appearing word. For more info see animate.css

5. animationOut

Type of animation for the disappearing word. For more info see animate.css

Author

wordmagik's People

Contributors

amyth avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.