GithubHelp home page GithubHelp logo

gerhobbelt / onescroll Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kahwee/onescroll

0.0 1.0 0.0 1.19 MB

A customizable scrollbar solution for jQuery.

Home Page: http://kw.sg/code/onescroll/

License: MIT License

onescroll's Introduction

Onescroll

A customizable scrollbar solution for jQuery.

Dependencies

Install via Bower

bower install jquery.onescroll --save

Usage

  1. Include jQuery:

    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.3/jquery.mousewheel.min.js"></script>
  2. Include plugin's code:

    <link href="../dist/onescroll.css" rel="stylesheet" type="text/css" />
    <script src="dist/jquery.onescroll.min.js"></script>
  3. Call the plugin:

    $("#element").onescroll({
    	width: "500px",
    	height: "300px"
    });

Examples

Let's try having four scrollbars, because why not:

$("#demo1").onescroll({
	height: "200px",
	width: "400px",
	scrollbars: [{
		type: "VerticalLeft",
		railPadding: ['2px', '3px'],
		railCss: {

		}
	}, {
		type: "VerticalRight",
		railPadding: ['40px', '30px'],
		railCss: {
		}
	}, {
		type: "HorizontalTop",
		railPadding: ['2px', '108px'],
		railCss: {
		}
	}, {
		type: "HorizontalBottom",
		railPadding: ['2px', '3px'],
		railCss: {
			visibility: 'hidden'
		}
	}]
});

To access the Onescroll object:

yourJQueryElement.data('plugin_onescroll')

Browser support

I have only tested this in the latest browsers.

  • Chrome
  • Firefox
  • Internet Explorer (Only tested in IE10)
  • Safari

Contributing

Check CONTRIBUTING.md

License

MIT License

onescroll's People

Contributors

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