Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Commit e30a641

Browse files
authored
Merge pull request #225 from andreruffert/develop
Release: v2.2.0
2 parents 694d51e + cb17ed1 commit e30a641

9 files changed

+32
-31
lines changed

.travis.yml

+5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
language: node_js
22
node_js:
33
- '0.10'
4+
cache:
5+
directories:
6+
- node_modules
7+
before_cache:
8+
- npm prune
49
before_install: npm install -g grunt-cli
510

611
notifications:

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright (c) 2015 André Ruffert, http://andreruffert.com
1+
Copyright (c) 2016 André Ruffert, http://andreruffert.com
22

33
Permission is hereby granted, free of charge, to any person
44
obtaining a copy of this software and associated documentation

README.md

+12-18
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
1-
# rangeslider.js
2-
[![Built with Grunt](https://cdn.gruntjs.com/builtwith.png)](http://gruntjs.com/) [![rangeslider.js](http://img.shields.io/badge/rangeslider-.js-00ff00.svg)](http://andreruffert.github.io/rangeslider.js/) [![Build Status](https://travis-ci.org/andreruffert/rangeslider.js.svg?branch=develop)](https://travis-ci.org/andreruffert/rangeslider.js) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/andreruffert/rangeslider.js)
1+
# <img src="http://rangeslider.js.org/rangeslider.js.png" width="50" valign="middle"> rangeslider.js
2+
3+
[![Build Status](https://travis-ci.org/andreruffert/rangeslider.js.svg?branch=develop)](https://travis-ci.org/andreruffert/rangeslider.js) [![npm downloads](https://img.shields.io/npm/dt/rangeslider.js.svg)](https://www.npmjs.com/package/rangeslider.js) [![npm version](https://img.shields.io/npm/v/rangeslider.js.svg)](https://www.npmjs.com/package/rangeslider.js)
34

45
> Simple, small and fast JavaScript/jQuery [polyfill](https://remysharp.com/2010/10/08/what-is-a-polyfill) for the HTML5 `<input type="range">` slider element.
56
6-
Check out the [examples](http://andreruffert.github.io/rangeslider.js/).
7+
Check out the [examples](http://rangeslider.js.org/).
78

89
* Touchscreen friendly
910
* Recalculates `onresize` so suitable for use within responsive designs
1011
* Small and fast
1112
* Supports all major browsers including IE8+
1213

1314
## Install
14-
Install with [Bower](http://bower.io/):
15-
``bower install --save rangeslider.js``
16-
17-
Install with [npm](https://www.npmjs.org/):
18-
``npm install --save rangeslider.js``
19-
20-
## Usage
15+
[📦](https://www.npmjs.org/): ``npm install --save rangeslider.js``
2116

22-
```
23-
// Initialize a new plugin instance for all
24-
// e.g. $('input[type="range"]') elements.
25-
26-
$('input[type="range"]').rangeslider();
27-
```
28-
29-
For more information check out the [website's section](http://andreruffert.github.io/rangeslider.js/#usage). For support visit the [gitter room](https://gitter.im/andreruffert/rangeslider.js).
17+
[🐧](http://bower.io/): ``bower install --save rangeslider.js``
3018

19+
## Further Reading
20+
- Understand how [rangeslider.js](http://rangeslider.js.org/) works in general.
21+
- File a [bug report](https://github.com/andreruffert/rangeslider.js/issues) for anything rangeslider.js related.
22+
- Ask a question such as "How do I …?". Open a [StackOverflow](https://stackoverflow.com/search?q=rangeslider.js) question with rangeslider.js tag or ask in the [Gitter chat room](https://gitter.im/andreruffert/rangeslider.js).
3123

3224
## License
3325
MIT © [André Ruffert](http://andreruffert.com)
26+
27+
[![rangeslider.js](https://img.shields.io/badge/rangeslider-.js-00ff00.svg)](http://rangeslider.js.org) [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/andreruffert/rangeslider.js) [![JS.ORG](https://img.shields.io/badge/js.org-rangeslider-ffb400.svg?style=flat-square)](http://js.org)

bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "rangeslider.js",
3-
"version": "2.1.1",
3+
"version": "2.2.0",
44
"homepage": "https://github.com/andreruffert/rangeslider.js",
55
"authors": [
66
"André Ruffert <[email protected]>"

dist/rangeslider.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -403,13 +403,14 @@
403403
pageCoordinate = 0;
404404

405405
if (typeof e['page' + ucCoordinate] !== 'undefined') {
406-
pageCoordinate = e['client' + ucCoordinate];
406+
pageCoordinate = e['page' + ucCoordinate];
407407
}
408+
// IE8 support :)
408409
else if (typeof e.originalEvent['client' + ucCoordinate] !== 'undefined') {
409410
pageCoordinate = e.originalEvent['client' + ucCoordinate];
410411
}
411-
else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0]['client' + ucCoordinate] !== 'undefined') {
412-
pageCoordinate = e.originalEvent.touches[0]['client' + ucCoordinate];
412+
else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0]['page' + ucCoordinate] !== 'undefined') {
413+
pageCoordinate = e.originalEvent.touches[0]['page' + ucCoordinate];
413414
}
414415
else if(e.currentPoint && typeof e.currentPoint[this.COORDINATE] !== 'undefined') {
415416
pageCoordinate = e.currentPoint[this.COORDINATE];

dist/rangeslider.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ <h2>Combination with native <code>&lt;details&gt;</code> element</h2>
205205
</div>
206206

207207
<script src="//localhost:8081"></script>
208-
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
208+
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
209209
<script src="../dist/rangeslider.js"></script>
210210
<script>
211211
$(function() {

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"name": "rangeslider.js",
33
"title": "rangeslider.js",
44
"description": "Simple, small and fast JavaScript/jQuery polyfill for the HTML5 <input type=\"range\"> slider element",
5-
"version": "2.1.1",
6-
"codename": "Banana Mania",
5+
"version": "2.2.0",
6+
"codename": "Orange",
77
"main": "dist/rangeslider.js",
88
"homepage": "https://github.com/andreruffert/rangeslider.js",
99
"author": {
@@ -65,4 +65,4 @@
6565
"files": [
6666
"dist"
6767
]
68-
}
68+
}

src/rangeslider.js

+4-3
Original file line numberDiff line numberDiff line change
@@ -402,13 +402,14 @@
402402
pageCoordinate = 0;
403403

404404
if (typeof e['page' + ucCoordinate] !== 'undefined') {
405-
pageCoordinate = e['client' + ucCoordinate];
405+
pageCoordinate = e['page' + ucCoordinate];
406406
}
407+
// IE8 support :)
407408
else if (typeof e.originalEvent['client' + ucCoordinate] !== 'undefined') {
408409
pageCoordinate = e.originalEvent['client' + ucCoordinate];
409410
}
410-
else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0]['client' + ucCoordinate] !== 'undefined') {
411-
pageCoordinate = e.originalEvent.touches[0]['client' + ucCoordinate];
411+
else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0]['page' + ucCoordinate] !== 'undefined') {
412+
pageCoordinate = e.originalEvent.touches[0]['page' + ucCoordinate];
412413
}
413414
else if(e.currentPoint && typeof e.currentPoint[this.COORDINATE] !== 'undefined') {
414415
pageCoordinate = e.currentPoint[this.COORDINATE];

0 commit comments

Comments
 (0)