Skip to content

Commit

Permalink
0.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown committed Mar 24, 2022
1 parent cfdf5e5 commit bf7b845
Show file tree
Hide file tree
Showing 20 changed files with 3,420 additions and 4,277 deletions.
67 changes: 28 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ Minimalistic but perfect custom scrollbar plugin

[![Travis CI](https://travis-ci.org/noraesae/perfect-scrollbar.svg?branch=master)](https://travis-ci.org/noraesae/perfect-scrollbar)

If you want information of old versions<0.6.0, please refer to
[an old documentation](https://github.com/noraesae/perfect-scrollbar/tree/0.5.9).

## Why perfect-scrollbar?

I was once working on a personal project, and trying to find the jQuery
Expand All @@ -31,8 +28,6 @@ I hope you love it!
* The design of the scrollbar should be (nearly) fully customizable.
* If the size of the container or the content changes, the scrollbar
size and position should be able to change.
* *New!* It should work with vanilla JavaScript and major tools like
NPM or Browserify.

## Then perfect-scrollbar is really *perfect*?

Expand All @@ -46,29 +41,22 @@ I hope you love it!
to update the size or position of the scrollbar, just update.
* Additionally, perfect-scrollbar uses 'scrollTop' and 'scrollLeft',
not absolute positioning or something messy.
* perfect-scrollbar supports RTL perfectly on both WebKit and Gecko based browsers.

It's cool, isn't it?
* perfect-scrollbar supports RTL on both WebKit and Gecko based browsers.

## Install

#### NPM
#### npm

The best way to install and use perfect-scrollbar is with NPM.
It's registered on [npm](https://www.npmjs.com/package/perfect-scrollbar) as `perfect-scrollbar`.
The best way to install and use perfect-scrollbar is with npm.
It's registered as [perfect-scrollbar](https://www.npmjs.com/package/perfect-scrollbar).

```
$ npm install perfect-scrollbar
```

#### Rails

In the case you would like to have perfect-scrollbar in your Rails application, there is the [perfect-scrollbar-rails gem](https://github.com/YourCursus/perfect-scrollbar-rails).

#### Manually

You can download the latest stable version with download links [here](http://noraesae.github.io/perfect-scrollbar/).
You also can find all releases on [Releases](https://github.com/noraesae/perfect-scrollbar/releases).
You can manually download perfect-scrollbar on [Releases](https://github.com/noraesae/perfect-scrollbar/releases).

#### From sources

Expand All @@ -84,30 +72,32 @@ $ npm install
$ gulp # will lint and build the source code.
```

#### Bower
#### JSFiddle

There is a Bower package for perfect-scrollbar as well. It is managed
under the [perfect-scrollbar-bower](https://github.com/noraesae/perfect-scrollbar-bower)
repository. The plugin is registered as `perfect-scrollbar`.
You can fork the following JSFiddles for testing and experimenting purposes:

```
$ bower install perfect-scrollbar
```
* [Perfect Scrollbar](https://jsfiddle.net/DanielApt/xv0rrxv3/)
* [Perfect Scrollbar (jQuery)](https://jsfiddle.net/DanielApt/gbfLazpx/)

#### Unofficial sources

The followings are not maintained officially. If there are issues of the following
sources, please ask in each repository.

#### CDNs
###### CDNs

* [cdnjs](http://www.cdnjs.com/libraries/jquery.perfect-scrollbar)
* [JSDelivr](https://www.jsdelivr.com/projects/perfect-scrollbar)

#### JSFiddle
###### Other projects

You can fork the following JSFiddles for testing and experimenting purposes:

* [Perfect Scrollbar](https://jsfiddle.net/DanielApt/xv0rrxv3/)
* [Perfect Scrollbar (jQuery)](https://jsfiddle.net/DanielApt/gbfLazpx/)
* [perfect-scrollbar-rails gem](https://github.com/YourCursus/perfect-scrollbar-rails)

## Before using perfect-scrollbar

***Please beware handling scroll event is bad for performance. It should be
avoided when possible.***

The following requirements should meet.

* the container must have a 'position' css style.
Expand All @@ -133,7 +123,7 @@ First of all, please check if the container element meets the
requirements.

```html
<link rel='stylesheet' href='dist/css/perfect-scrollbar.css' />
<link rel="stylesheet" href="dist/css/perfect-scrollbar.css" />
<style>
#container {
position: relative;
Expand All @@ -152,7 +142,7 @@ var Ps = require('perfect-scrollbar');
Or you can just load the script file as usual.

```html
<script src='dist/js/perfect-scrollbar.js'></script>
<script src="dist/js/perfect-scrollbar.js"></script>
```

To initialise the plugin, `Ps.initialize` is used.
Expand Down Expand Up @@ -211,7 +201,7 @@ require('perfect-scrollbar/jquery')($);
For sure, you can just import a built script.

```html
<script src='dist/js/perfect-scrollbar.jquery.js'></script>
<script src="dist/js/perfect-scrollbar.jquery.js"></script>
```

After importing it, you can use the plugin in the usual way.
Expand Down Expand Up @@ -422,14 +412,13 @@ the child is a `textarea`. All other elements need to have the `ps-child` class.

## IE Support

The plugin is designed to work in modern browsers, including the very latest
version of IE and Edge. Specifically, it should work in IEs >= IE10. If there
is any issue in the browsers, please [file it](https://github.com/noraesae/perfect-scrollbar/issues).
The plugin is designed to work in modern MS browsers, specifically including IE
11 and Edge. When there is any issue in the browsers, please [file it](https://github.com/noraesae/perfect-scrollbar/issues).

**The patches to fix problems in IE<=9 won't be accepted.**
**The patches to fix problems in IE<=10 won't be accepted.**

When old IEs should be supported, please fork the project and
make patches personally.
When old IEs should be supported, please fork the project and make patches
personally.

## Helpdesk

Expand Down
3 changes: 3 additions & 0 deletions docs/cp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash
cp ../dist/js/perfect-scrollbar.min.js ./
cp ../dist/css/perfect-scrollbar.min.css ./
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ <h2 class='subtitle'>Source</h2>
</pre>
<h2 class='subtitle'>Download</h2>
<p>
<a href='https://github.com/noraesae/perfect-scrollbar/releases' class='btn btn-primary btn-large'>perfect-scrollbar v0.7.0</a>
<a href='https://github.com/noraesae/perfect-scrollbar/releases' class='btn btn-primary btn-large'>perfect-scrollbar v0.7.1</a>
</p>
<h2 class='subtitle'>Documentation</h2>
<p class='lead'>
Expand Down
2 changes: 1 addition & 1 deletion docs/perfect-scrollbar.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/perfect-scrollbar.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions examples/always-visible.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
</style>
<style>
/* to make scrollbars always visible */
.always-visible.ps-container > .ps-scrollbar-x-rail,
.always-visible.ps-container > .ps-scrollbar-y-rail {
.always-visible.ps.container > .ps__scrollbar-x-rail,
.always-visible.ps.container > .ps__scrollbar-y-rail {
opacity: 0.6;
}
</style>
Expand Down
Loading

0 comments on commit bf7b845

Please sign in to comment.