Giter Site home page Giter Site logo

jquery-ticker's Introduction

jquery-ticker

Rewrite of jQuery.ticker


Required

jQuery (Developed on 2.1.1)

http://jquery.com/


Demos

http://seckie.github.io/jquery-ticker/demo


Usage

Step01

Load jquery.js and this plugin in "head" element

<script src="jquery.js"></script>
<script src="jquery.ticker.js"></script>

If you want to use "Velocity.js" animation, you have to load velocity.js in addition.

<script src="velocity.js"></script>

Step02

Set style display:inline-block: float:left; to elements of content.

<style>
.ticker-item {
  display: inline-block;
  float: left;
}
</style>

<div class="ticker">
<div class="ticker-item"> ... </div>
<div class="ticker-item"> ... </div>
<div class="ticker-item"> ... </div>
</div>

Step03

Get the content's parent element via jQuery selector, and fire the plugin with some options.

<script>
$(function() {
  $('.ticker').ticker(
    content: '.ticker-item'
  );
});
</script>

Options

option name default value data type description
content ".ticker-item" String
(Selector String)
Content elements selector (required)
duration 500 Number Duration of animation. If you set shorter, animation gets faster.
wrapperClassName "ticker-wrapper" String Wrapper DIV that has this className will generate by the plugin.
innerClassName "ticker-inner" String Inner DIV that has this className will generate by the plugin.
hoverStop true Boolean Whether stop animation when mouseover
velocityJs false Boolean Animate method'll be replaced by Velocity.js when you set it "true"

License

MIT License

jquery-ticker's People

Watchers

James Cloos avatar Naoki Sekiguchi 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.