Giter Site home page Giter Site logo

mbslider's Introduction

#mbSlider.js ##移动端 无缝轮播插件,无依赖,轻巧

在线演示:http://www.byex.cn/mbSlider

Written by: hishion

##使用步骤

###Step 1: 引入资源文件

<!-- mbSlider CSS file -->
<link href="mbSlider.css" rel="stylesheet" />
<!-- mbSlider Javascript file -->
<script src="mbSlider.js"></script>

###Step 2: 编写html

<div class="mb-container">
    <div class="mb-wrapper">
        <div class="mb-slide">1</div>
        <div class="mb-slide">2</div>
        <div class="mb-slide">3</div>
    </div>
</div>

###Step 3: 调用 mbSlider

var app = new mbSlider({
    container: '.mb-container'
});

##配置项

以下参数全部为默认值

var app = new mbSlider({
    container: '.mb-container',
    wrapper: '.mb-wrapper',
    itmes: '.mb-slide',
    //自动播放 : Number/ms || Boolean
    autoplay: 4500,
    //动画持续时间  Number/ms
    duration: 300,
    //方向 : 'vertical||horizontal'
    direction: 'horizontal',
    //是否显示左右按钮
    isControl: false,
    //是否显示分页按钮
    isPages: false,
    //滑动开始
    tapStart: function(){
        //console.log('tapStart!')
    },
    //滑动中
    tapMove: function(){
        //console.log('tapMove!')
    },
    //滑动结束
    tapEnd: function(){
       //console.log('tapEnd!')
    },
    //运动结束
    aniStart: function(){
        //console.log('aniStart!')
    },
    //运动结束
    aniEnd: function(){
        console.log('aniEnd!')
    },
    //浏览器前缀
    engine: ['webkit', 'ms', 'o', 'moz']
});

mbslider's People

Contributors

xiaohai18 avatar

Stargazers

 avatar  avatar  avatar 新儿 avatar 木木 avatar 李云龙 avatar  avatar

Watchers

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