GithubHelp home page GithubHelp logo

radjkerimov / jquery.horizonscroll.js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from trgraglia/jquery.horizonscroll.js

0.0 0.0 0.0 166 KB

This is a jQuery plugin which allows for websites to scroll left and right horizontally.

License: MIT License

CSS 1.27% HTML 2.03% JavaScript 96.70%

jquery.horizonscroll.js's Introduction

jquery.horizonScroll.js - Horizontal Scrolling (Paging) Websites

This is a jQuery plugin which allows for websites to page(scroll by set width) left and right horizontally. Horizontal scroll sites offer a new and unique way to develope sites! Check it out and give feedback! THX

Demo

Click here for the demo

Usage

Initial usage. All elements specified by the selector become a page.

$('selector').horizon();

If you do not want to use jquery.swipeTouch.js for swipe left and right:

$('selector').horizon({swipe: false});

Additional plugin options and their default values:

$.fn.horizon.defaults = {
    scrollTimeout: null,
    scrollEndDelay: 250,
    scrollDuration: 400,
    i: 0,
    limit: 0,
    docWidth: 0,
    sections: null,
    swipe: true,
    fnCallback: function (i) {}
};

You can invoke a left page scroll, right page scroll or page scroll to a page index. This helps if you would like to bind to additional elements on the page. The selector here is ignored.

$(document).horizon('scrollRight');
$(document).horizon('scrollLeft');

// As of 1.1.0, i can be an integer with or without quotes in order to scroll to an index.
// Or i can be a string of an element id to scroll to.
$(document).horizon('scrollTo', i); 

Changelog

1.1.0:

  • Added support for element IDs using scrollTo()
  • Added support for animating the scroll to a section via hash links
  • Updated sample index.html
  • Updated readme

Notes and References

http://stackoverflow.com/questions/4989632/differentiate-between-scroll-up-down-in-jquery http://stackoverflow.com/questions/4289473/javascript-do-an-action-after-user-is-done-scrolling http://stackoverflow.com/questions/175739/is-there-a-built-in-way-in-javascript-to-check-if-a-string-is-a-valid-number

jquery.horizonscroll.js's People

Contributors

trgraglia 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.