Giter Club home page Giter Club logo

jqdoublescroll's Introduction

jQuery DoubleScroll Plugin

A Simple jQuery plugin to display additional scrollbar on top of the element.
This plugin does not requires jQuery-UI

Usage

Call the doubleScroll function on the desired jQuery elements on page load :

$(document).ready(function() {
   $('.double-scroll').doubleScroll();
});

Options

You can configure the double scroll with the following options :

{
	contentElement: undefined, // Widest element, if not specified first child element will be used
	scrollCss: {                
		'overflow-x': 'auto',
		'overflow-y': 'hidden'
	},
	contentCss: {
		'overflow-x': 'auto',
		'overflow-y': 'hidden'
	},
	onlyIfScroll: true, // top scrollbar is not shown if the bottom one is not present
	resetOnWindowResize: false // recompute the top ScrollBar requirements when the window is resized
}
contentElement

The element to use as the scroll reference.
First child element is used if nothing is specified.

scrollCss

Key-Value pairs that allow you to customize the top scrollbar CSS.

contentCss

Key-Value pairs that allow you to customize the content CSS.

onlyIfScroll

If true, will display the top scrollbar only if the content is scrollable...

resetOnWindowResize

If true, will attach an event to regenerate the top scrollbar when the window is resized.
Use it when the scrollable element has a width which is relative to the window width.

Licence

Dual licensed under the MIT and GPL licenses:

Authors

jqdoublescroll's People

Contributors

avianey avatar coliff avatar halfninja avatar lol768 avatar raffaelj 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.