• Stars
    star
    396
  • Rank 108,801 (Top 3 %)
  • Language
    HTML
  • License
    MIT License
  • Created almost 11 years ago
  • Updated almost 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A simple, high-performance and cross-browser jQuery rotating / carousel plugin for text phrases powered by Animate.css.

Morphext

Dev Dependency Status

A simple, high-performance and cross-browser jQuery rotating / carousel plugin for text phrases powered by Animate.css. It is more succinctly described by Softpedia as:

A jQuery plugin for creating text-based carousels, rotating small or large pieces of text one after the other, just like a slider does with images... This can be a great tool for displaying catch phrases, mission statements, tag lines, and so on.

If you would like to achieve a similar effect with more flexibility (e.g. out animation) and with HTML objects rather than text phrases (e.g. unordered list items), please check out Morphist.

Website / Demo

Install

Download from the project page.

Install with Bower: bower install --save Morphext

Usage

  1. Import the latest Animate.css and jQuery library into your HTML.

  2. Import morphext.css and include morphext.min.js in your HTML document.

  3. Encapsulate your rotating phrases in an element and separate each phrase with a comma or a separator of your choice:

    I am a <span id="js-rotating">So Simple, Very Doge, Much Wow, Such Cool</span> Text Rotator
  4. Trigger the plugin by calling Morphext() on the element containing the rotating phrases:

    $("#js-rotating").Morphext();

A demo titled index.html is included in this repository. Open it to see the end-result.

Options

Morphext exposes the following options to alter the behaviour of the plugin:

Option Type Default Description
animation string bounceIn The [in] animation type. Refer to Animate.css for a list of available animations.
separator string , An array of phrases to rotate are created based on this separator. Change it if you wish to separate the phrases differently (e.g. So Simple / Very Doge / Much Wow / Such Cool).
speed int 2000 The delay between the changing of each phrase in milliseconds.
complete object Function null A callback that is executed after an item is animated in.

They may be used like so:

$("#js-rotating").Morphext({
    animation: "fadeIn", // Overrides default "bounceIn"
    separator: "|", // Overrides default ","
    speed: 3000, // Overrides default 2000
    complete: function () {
        // Overrides default empty function
    }
});

The plugin relies heavily on Animate.css for its smooth, high performance animations to transition between each phrase. Thus, the default animation speed (different from the interval between each phrase as described above) may be altered via CSS:

#yourElement, .yourClass {
    /* Overrides Animate.css 1s duration */
    -vendor-animation-duration: 3s;
}

"Issues"

Issue Description Solution
Viewport Certain animations (e.g. "up" and "down") by Animate.css involves translating the element beyond the viewport thereby leading to unintended vertical and/or horizontal whitespace (further evident by the scrollbar "following" the animation effect. This is not a bug. It may be eradicated by applying overflow: hidden; (CSS) to the parent of the element being animated.
JavaScript JavaScript is required for the addition / removal of elements with Animate.css [CSS animation] classes thereby creating the "transitioning effect". If JavaScript is disabled or unavailable, nothing will happen. All the phrases and its separator will be shown as it is (graceful degradation). N/A
CSS3 Animate.css relies on CSS3 animations and transformations (available in most modern browsers). If CSS3 is disabled or unavailable, the phrases will continue to transition from one to another (assuming JavaScript is enabled), but there will be no animation effect. No fallback is provided by this plugin. You may however, handle the fallback through the use of Modernizr (for feature detection) and polyfills.

Should you encounter any problems or require assistance with this plugin, simply open a GitHub issue in this repository or you may contact me via Twitter.

Prerequisites

Others

Native ports of Morphext have been developed in other JavaScript frameworks (e.g. React and Polymer):

They are not part of the official plugin development and the approach used in developing these ports may not be idiomatic. Please use them at your own risk.

Issues and pull requests are welcomed.

License

Morphext is licensed under the MIT license (http://ian.mit-license.org/).

More Repositories

1

Morphist

A simple, high-performance and cross-browser jQuery slider / slideshow / carousel plugin for child objects powered by Animate.css.
JavaScript
61
star
2

go-node-ffi

[INACTIVE] An experiment using Go 1.5 buildmode to compile shared C libraries, and to subsequently access them through NodeJS bindings via node-ffi. Compatible with Go 1.9, and Node 7.
C
23
star
3

go-ghostscript

Idiomatic Go bindings for Ghostscript Interpreter C API.
Go
21
star
4

docker-kong-dev

[INACTIVE] An unofficial Docker image (tooling) for Kong testing, and development.
Shell
12
star
5

Literally-Drawing

[INACTIVE] A real-time, collaborative, HTML5 drawing widget powered by KineticJS / FabricJS and inspired by Literally Canvas.
CoffeeScript
10
star
6

k8s-ingress-examples

Examples / comparisons of various routing strategies in different Kubernetes "Ingress" controllers.
7
star
7

historyx

📆 A Chrome extension to enhance your browsing history experience.
JavaScript
7
star
8

kong-plugin-aws

[INACTIVE] A Kong plugin for signing incoming requests with Amazon Web Services (AWS) authentication headers.
Lua
7
star
9

docker-gremlin-neo4j

An unofficial set of lightweight Docker, and Docker Compose files for working with Apache TinkerPop™ Gremlin Console, Gremlin Server, and Neo4j.
Shell
6
star
10

go-qpdf

Simple Go bindings for qpdf C / C++ API; mostly for linearization.
Go
5
star
11

terraform-provider-cabot

[INACTIVE] Terraform provider for Arachnys' Cabot. Create, manage, and manipulate status checks, and alerts for services.
Go
5
star
12

forward-ext-authz-service

A forward authentication / authorisation (authN) implementation of Envoy External Authorization (ext_authz), built with Contour, and Pomerium in mind.
Go
5
star
13

base-camp

Solidity solutions for exercises in Base Camp, the smart contract learning program, using Foundry.
Solidity
4
star
14

dotfiles

A set of configuration files for my home, and work development environment.
Shell
3
star
15

go-nx

A Go package for parsing, and programmatically working with NX/PKG4 files.
Go
3
star
16

cloudflare-ext-authz-service

An Envoy External Authorization (ext_authz) service for ensuring requests are authenticated through Cloudflare Access, built with Contour in mind.
Go
3
star
17

kubeseal-web

🔐 Yet another web UI for protecting Kubernetes secrets with Sealed Secrets.
HTML
3
star
18

Hyperion-Database

[INACTIVE] A modern, experimental, object-oriented (My)SQL database abstraction layer with a CRUD interface written in PHP.
PHP
2
star
19

Euler

My polyglot (hopefully, in the future) attempts at Project Euler problems through idiomatic solutions.
Elixir
2
star
20

zeebe-nats-streaming-exporter

[INACTIVE] An exporter for Zeebe to publish records NATS Streaming Server (STAN).
Go
2
star
21

mypi

A terrible excuse for a Python pun, but really, a repository for my Raspberry Pi, and general homelab stuff.
Shell
2
star
22

aft.js

Away From Tab: A lightweight, vanilla JavaScript plugin to remind visitors about your page when they switch to a different tab.
JavaScript
2
star
23

go-cabot

[INACTIVE] An idiomatic Go client library for interacting with Arachnys' Cabot API.
Go
2
star
24

go-steamwebapi

A simple, and idiomatic Go package for programmatically working with Steam's Web API (particularly its Dota 2 Web API).
Go
1
star
25

docker-headless-chromium

[INACTIVE] A lightweight Docker image for headless Chromium, with remote debugging support.
Shell
1
star
26

go-instafollowers

[DEFUNCT] A simple Go CLI app for managing your Instagram followers, and for generating access tokens.
Go
1
star