Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# http://editorconfig.org

root = true

[*]
charset = utf-8
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
indent_style = tab
indent_size = tab

[package.json]
indent_style = space
indent_size = 2
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
/.settings
/.project
/.buildpath
node_modules/
dist/
37 changes: 34 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,37 @@
scrollbar
Scrolling
=========

Custom scrollbar with mootools.
Adds custom scrollbars to *native* scrolling area.

Try it out: http://jarkt.github.io/scrollbar/
<!--- keep screenshot image size at about 200x100 -->
![Screenshot](https://github.com/inta/scrolling/raw/master/screen.png)

How to use
----------

You need a container and scroll area element for scrolling:

<div data-scrolling data-scrolling-interactive>
<div data-scrolling-area>
scrollable content goes here
</div>
</div>

You can set data-scrolling to a custom class name which will be used as
base/prefix for all classes.

You have to create an instance for every scrolling element:

new Scrolling(document.querySelector('[data-scrolling]'));

// or for multiple elements

for (const container of document.querySelectorAll('[data-scrolling]')) {
new Scrolling(container);
}

DOM has to be ready for initialization, because the size of the elements is
required to be known.

If scroll content changes, trigger the update event on the container element,
or if you are holding a reference to the instance, call the update method on it.
49 changes: 0 additions & 49 deletions css/reset.css

This file was deleted.

193 changes: 0 additions & 193 deletions css/style.css

This file was deleted.

Loading