Code Monkey home page Code Monkey logo

jquery-slider's Introduction

jquery-slider

Jquery Plugin - Basic Slider

This is a very basic slider for use with jquery for mobile and web applications. The slides are responsive and will resize to fit the container they are placed in. The slides use hardware acceleration to transition between slides and also respond to touch events for a much smoother native feel on mobile browsers and hybrid applications.

Requires Jquery Touch/Tap Events

##HTML Markup:

  <div id="slider">
      <div class="slides">
          <div class="slide-wrapper">
              <div class="slide">
                <p>Slide 1</p>
              </div>
          </div>
          <div class="slide-wrapper">
              <div class="slide">
                <p>Slide 2</p>
              </div>
          </div>
          <div class="slide-wrapper">
              <div class="slide">
                <p>Slide 3</p>
              </div>
          </div>
          <div class="slide-wrapper">
              <div class="slide">
                <p>Slide 4</p>
              </div>
          </div>
      </div>
  </div>

##Basic usage:

var slider = $("#slider").slider();

##Advanced usage:

var slider = $("#slider").slider({
  afterAnimation: function(slider) {
    var currentSlide = slider.currentSlide();
    var totalSlides = slider.totalSlides();
    
    // do something with the current slide
  }
});

##Options:

  beforeAnimation       Function to be called before slides start animation
  afterAnimation        Function be called after slides finish animation
  init                  Function to be called during slider initialization
  showpagination        Boolean to hide or show slide indicators
  paginationType        String declaring type of pagination to display
                        numbers  - Will display numbers, 1 of 12
                        ellipsis - Will display circlular dots
                        scrollbar - Will display a scrollbar
  ellipsisDisplay       String declaring how to display ellipsis pagination indicators
                        default  - Will display one dot per slide
                        fixed - Will display 3 dots, left indicating first slide, right
                        indicating last slide, center indicating all others in between
  scrollWithBarOnly     Boolean to restrict scroll bar movement only when the scrollbar
                        is being moved (this does not restrict slide movement by sliding)
  scrollBarFade         Boolean that will fade out the scrollbar when not in use

jquery-slider's People

Contributors

richardortiz84 avatar

Watchers

 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.