Code Monkey home page Code Monkey logo

simple-text-rotator's Introduction

#Super Simple Text Rotator by Pete R. A light weight jQuery plugin that will allow you to add a super simple rotating text to your website with little to no markup Created by Pete R., Founder of BucketListly

Demo

View demo

Usage

To use this on your website, simply include the latest jQuery library found here together with jquery.simple-text-rotator.js and simpletextrotator.css into your document's <head>, and all you need is one extra tag for your html document and a function call:

Super <span class="rotate">Simple, Customizable, Light Weight, Easy</span> Text Rotator with Style

Put every rotating words inside the <span class="rotate"></span> and separate it with a comma and the script will automatically cycle through each words in order.

$(".rotate").textrotator({
  animation: "dissolve", // You can pick the way it animates when rotating through words. Options are dissolve (default), fade, flip, flipUp, flipCube, flipCubeUp and spin.
  separator: ",", // If you don't want commas to be the separator, you can define a new separator (|, &, * etc.) by yourself using this field.
  speed: 2000 // How many milliseconds until the next word show.
});

Other Resources

  • Tutorial (Coming Soon)

simple-text-rotator's People

Contributors

peachananr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simple-text-rotator's Issues

Add a destroy function

Hi there,

I'm using this great tiny plugin but there's one thing I don't know how to do : remove or destroy the plugin when set on an element.

I know a lot of jQuery plugins out there have this function available.

I looked at the code and I'm not sure of how to process.

Thanks for any help :)

Small Issue When Tabbing Out

Hi there,
I love the plugin! However I'm running into this issue when testing.

The problem occurs when you either leave the Chrome browser (as in focus on another program in Windows), or when you change tabs. It seems like the script stops, then tries to catch up with itself, creating "blank" words. I'm not sure if this is a Chrome issue, or an issue with the plugin.

Here's two examples:

Is there a way to fix this? Any support or leads would be greatly appreciated.

Thanks!

'Fade' animation skip

I noticed the 'fade' animation seems to skip every other item in the list. Not sure what's up with that.

animate width of the containing span

Hi,

Nice plugin! One thing, I was wondering if it'd be possible to make it so width of the containing span gets animated when changing words rather than simply snapping to the width of the new word?

This is probably really simple to do but I have a distinct lack of JavaScript skills currently so a little help would be much appreciated!

Kind regards
Danny

Conflict with Foundation / Wordpress?

Hi,

I don't get it to work in a Wordpress / Zurb Foundation environment. Any chance there might be some kind of conflict?

Both the JS and the CSS are loaded, and class name and separator are correct.

Thanks!

Line Break

Hey there!
is there any way to add a linebreak [ < br > ] in one of the rotated sentences?

Best Regards
Alex Sindalovsky

Small error in sample code

Hi Pete,

Your sample code below was missing a comma in the arguments list after the separator arguments:

$(".rotate").textrotator({
animation: "dissolve", // You can pick the way it animates when rotating through words. Options are dissolve (default), fade, flip, flipUp, flipCube, flipCubeUp and spin.
separator: ",", // If you don't want commas to be the separator, you can define a new separator (|, &, * etc.) by yourself using this field.
speed: 2000 // How many milliseconds until the next word show.
});

Text appears reversed in IE 10

Some of the animations are bugged on Internet Explorer 10 (especially ones that requires rotations - refer to attached screenshot). The text is reversed when animating in.

The fade animation appears to be working fine.

example

Delay start? And stop on last word?

Hi there,

Was just wondering if you could instruct me how to delay the start of the function. And then also stop on the last word in the string.

Many thanks!

Keeping anchor tags

Hi,

This is a very nice plugin. I just want to know if it is possible to keep the links on every word? The plugin removed them automatically.

My code:
<span class="rotate"><a href="#link1">Word 1</a>, <a href="#link2">Word 2</a>, <a href="#link3">Word 3</a></span>

Thanks,
Phe

jquery dependency

Any plans to eventually remove the jquery dependency?

If there's absolutely no interest from others in removing the jquery dependency in this repo, no big deal. I'll just start my own repo from scratch (it's probably easier than forking too).

Chrome Display Issue

Hello,

I noticed that in the latest version of Chrome (Windows), the fading text overlaps.

In FireFox and IE it displays properly.

Any ideas how to correct this?

Thanks... and great job on this effect!

This plugin skips ever other word

Took me a while to figure out why my code was skipping over every other word then I went to your demo and saw its doing the same thing, what it should be doing is going from "Simple" to "Customizable" to "Light Weight" to "Easy", and then back around but it skips, which probably isn't a big deal when you have an odd number of words, but when you have an even number you can really tell it doesn't work, also on your demo you can see it keeps going back and forth between "Simple" and "Light Weight".

Appears to only be happening when using fade...

How can I fix this?

Removing blank lines

Is there a way to not have a blank line in between sets of text?

I use this library to display a series of messages on my company's internal website and it works great except it seems to add a blank link at the end of the messages.

So for instance I four lines of text and I use the ** as the separator

line1line2line3line4

and then I "dissolve" into each of them. After the fourth one it adds a blank line for no reason.

Any idea how I can get rid of this?

Thanks so much in advance,

SCF

Space between words causes strange behaviour when rotating to the next word in orde

When is jumps from "Webshop Owner!" to Designer! It first puts a line break between Webshop and Owner and then start the rotation. This causes a strange visual effect within Chrome.

Hello, Entrepreneur!, Webshop owner!, Designer!, Consultant!

<script type="text/javascript"> $(".rotate").textrotator({ animation: "flip", // You can pick the way it animates when rotating through words. Options are dissolve (default), fade, flip, flipUp, flipCube, flipCubeUp and spin. separator: ",", // If you don't want commas to be the separator, you can define a new separator (|, &, * etc.) by yourself using this field. speed: 2000 // How many milliseconds until the next word show. }); </script>

Rotating text over CSS3 gradient background

Using simple text rotator over a CSS gradient background leads to clipping / artifacting.

CSS background code:

background: radial-gradient(circle, rgba(137, 191, 227, 0.6), rgba(52, 152, 219, 0.1) 80%), url(/assets/images/bg.png)

Result (note faint boxes around text):

screenshot 2014-03-08 01 13 39

Resizing the window, which forces a redraw of the CSS gradient resolves it, until the next piece of text rotates.

Issue also confirmed on the demo site.

PLEASE MAKE THIS CHANGE TO YOUR DOCUMENTATION. Thanks.

$(".rotate").textrotator({
animation: "dissolve", // You can pick the way it animates when rotating through words. Options are dissolve (default), fade, flip, flipUp, flipCube, flipCubeUp and spin.
separator: "," // If you don't want commas to be the separator, you can define a new separator (|, &, * etc.) by yourself using this field.
speed: 2000 // How many milliseconds until the next word show.
});

Should be ( PLEASE NOTE THE CHANGE )
Wrong
separator: ","
Right
separator: ",",

$(".rotate").textrotator({
animation: "dissolve", // You can pick the way it animates when rotating through words. Options are dissolve (default), fade, flip, flipUp, flipCube, flipCubeUp and spin.
separator: ",", // If you don't want commas to be the separator, you can define a new separator (|, &, * etc.) by yourself using this field.
speed: 2000 // How many milliseconds until the next word show.
});

flip difference Edge vs Chrome

Animation difference when executing is Edge or in Chrome. In Edge it is more a swirl then a flip.

Hello, Entrepreneur!, Webshop owner!, Designer!, Consultant!

<script type="text/javascript"> $(".rotate").textrotator({ animation: "flip", // You can pick the way it animates when rotating through words. Options are dissolve (default), fade, flip, flipUp, flipCube, flipCubeUp and spin. separator: ",", // If you don't want commas to be the separator, you can define a new separator (|, &, * etc.) by yourself using this field. speed: 2000 // How many milliseconds until the next word show. }); </script>

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.