Skip to content
This repository has been archived by the owner on May 30, 2024. It is now read-only.

Commit

Permalink
Merge pull request #225 from andreruffert/develop
Browse files Browse the repository at this point in the history
Release: v2.2.0
  • Loading branch information
andreruffert authored Jul 12, 2016
2 parents 694d51e + cb17ed1 commit e30a641
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 31 deletions.
5 changes: 5 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
language: node_js
node_js:
- '0.10'
cache:
directories:
- node_modules
before_cache:
- npm prune
before_install: npm install -g grunt-cli

notifications:
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2015 André Ruffert, http://andreruffert.com
Copyright (c) 2016 André Ruffert, http://andreruffert.com

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
Expand Down
30 changes: 12 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,27 @@
# rangeslider.js
[![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)
# <img src="http://rangeslider.js.org/rangeslider.js.png" width="50" valign="middle"> rangeslider.js

[![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)

> 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.
Check out the [examples](http://andreruffert.github.io/rangeslider.js/).
Check out the [examples](http://rangeslider.js.org/).

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

## Install
Install with [Bower](http://bower.io/):
``bower install --save rangeslider.js``

Install with [npm](https://www.npmjs.org/):
``npm install --save rangeslider.js``

## Usage
[📦](https://www.npmjs.org/): ``npm install --save rangeslider.js``

```
// Initialize a new plugin instance for all
// e.g. $('input[type="range"]') elements.
$('input[type="range"]').rangeslider();
```

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).
[🐧](http://bower.io/): ``bower install --save rangeslider.js``

## Further Reading
- Understand how [rangeslider.js](http://rangeslider.js.org/) works in general.
- File a [bug report](https://github.com/andreruffert/rangeslider.js/issues) for anything rangeslider.js related.
- 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).

## License
MIT © [André Ruffert](http://andreruffert.com)

[![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)
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rangeslider.js",
"version": "2.1.1",
"version": "2.2.0",
"homepage": "https://github.com/andreruffert/rangeslider.js",
"authors": [
"André Ruffert <[email protected]>"
Expand Down
7 changes: 4 additions & 3 deletions dist/rangeslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -403,13 +403,14 @@
pageCoordinate = 0;

if (typeof e['page' + ucCoordinate] !== 'undefined') {
pageCoordinate = e['client' + ucCoordinate];
pageCoordinate = e['page' + ucCoordinate];
}
// IE8 support :)
else if (typeof e.originalEvent['client' + ucCoordinate] !== 'undefined') {
pageCoordinate = e.originalEvent['client' + ucCoordinate];
}
else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0]['client' + ucCoordinate] !== 'undefined') {
pageCoordinate = e.originalEvent.touches[0]['client' + ucCoordinate];
else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0]['page' + ucCoordinate] !== 'undefined') {
pageCoordinate = e.originalEvent.touches[0]['page' + ucCoordinate];
}
else if(e.currentPoint && typeof e.currentPoint[this.COORDINATE] !== 'undefined') {
pageCoordinate = e.currentPoint[this.COORDINATE];
Expand Down
2 changes: 1 addition & 1 deletion dist/rangeslider.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ <h2>Combination with native <code>&lt;details&gt;</code> element</h2>
</div>

<script src="//localhost:8081"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jquery/3.1.0/jquery.min.js"></script>
<script src="../dist/rangeslider.js"></script>
<script>
$(function() {
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "rangeslider.js",
"title": "rangeslider.js",
"description": "Simple, small and fast JavaScript/jQuery polyfill for the HTML5 <input type=\"range\"> slider element",
"version": "2.1.1",
"codename": "Banana Mania",
"version": "2.2.0",
"codename": "Orange",
"main": "dist/rangeslider.js",
"homepage": "https://github.com/andreruffert/rangeslider.js",
"author": {
Expand Down Expand Up @@ -65,4 +65,4 @@
"files": [
"dist"
]
}
}
7 changes: 4 additions & 3 deletions src/rangeslider.js
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,14 @@
pageCoordinate = 0;

if (typeof e['page' + ucCoordinate] !== 'undefined') {
pageCoordinate = e['client' + ucCoordinate];
pageCoordinate = e['page' + ucCoordinate];
}
// IE8 support :)
else if (typeof e.originalEvent['client' + ucCoordinate] !== 'undefined') {
pageCoordinate = e.originalEvent['client' + ucCoordinate];
}
else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0]['client' + ucCoordinate] !== 'undefined') {
pageCoordinate = e.originalEvent.touches[0]['client' + ucCoordinate];
else if (e.originalEvent.touches && e.originalEvent.touches[0] && typeof e.originalEvent.touches[0]['page' + ucCoordinate] !== 'undefined') {
pageCoordinate = e.originalEvent.touches[0]['page' + ucCoordinate];
}
else if(e.currentPoint && typeof e.currentPoint[this.COORDINATE] !== 'undefined') {
pageCoordinate = e.currentPoint[this.COORDINATE];
Expand Down

0 comments on commit e30a641

Please sign in to comment.