Git Product home page Git Product logo

marqueelottery's Introduction

Marquee Lottery

Instruction

Marquee Lottery jQuery plugin for more convenient create lottery activity.You only need to care about the CSS or HTML code.

Installation

Composer

composer require bower-asset/marquee-lottery

Bower

bower install marquee-lottery

NPM

npm install marquee-lottery

Example

$(function(){
   $('.btn').marquee({
       activeClass:'active-img',
       finishCallback:function(){
           alert(1);
       },
       ele:[
           '.first-img',
           '.second-img',
           '.third-img',
           '.4th-img',
           '.5th-img',
           '.6th-img',
           '.7th-img',
           '.8th-img'
       ],
       desIndex:3
   });
    $('.btn').click(function(){
        $('.btn').marquee('start');
    });
});

marquee-lottery.gif

Before using the marquee-lottery, you should layout the page first.

Usage

First of all,you should know that speed mode only support one, which ease-in-ease-out mode.

Configuration

ele:The jQuery selector of gift image,its order according to you need order.If you want let second image at the begin of running, you should put it in first index of ele.

maxTime:The max time of the gift image switch.

minTime:The min time of the gift image switch.

desIndex:This param should resolve from server, the gift image stop at desIndex position.

roundTotal:Number of circles for running.In fact, circles is roundTotal + 1.The last of circle will select the desIndex.

finishCallback:This callback is called at the end of running.

delay:Delay the given time to call the finishCallback.

activeClass:When pass the every gift image add the activeClass class.

reduceTimeStep:The time reduce in the speed up.

addTimeStep:The time add in the slow down.

$('#id').marquee('start'); Start marquee right now.

0.1.5 New

You can use the following code to listen the start-marquee-animation or finish-marquee-animation event. $('#id').on('start-marquee-animation') or $('#id').on('start-marquee-animation')

CoderLiu

marqueelottery's People

Contributors

liuzexin avatar

Stargazers

 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.