Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: luma/jquery-slider
base: 4f35336d9a
...
head fork: luma/jquery-slider
compare: 0324641df1
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 6 additions and 4 deletions.
  1. +1 −1  README.md
  2. +5 −3 jquery.slider.js
View
2  README.md
@@ -40,7 +40,7 @@ Create a Mic Level control, with specific min, max, step, and a starting value:
$('.mic-volume').slider({
value: 50,
- }, function(value) {
+ }, function(event, value) {
console.info("Selected value is " + value);
});
View
8 jquery.slider.js
@@ -9,7 +9,7 @@
// $(...selector...).slider('setValue', 60);
// $(...selector...).slider('getValue'); // => 60
//
-// $(...selector...).on('changevalue.slider', function(value) {
+// $(...selector...).on('changevalue.slider', function(event, value) {
// console.info("Selected Value is " + value);
// });
//
@@ -74,8 +74,8 @@
var values = [];
this.each(function() {
- var data = $this.data('slider');
- values.push(data.value);
+ var data = $(this).data('slider');
+ if (data) values.push(data.value);
});
switch(values.length) {
@@ -117,6 +117,8 @@
var data = $this.data('slider'),
steppedValue = value;
+ if (!data) return;
+
if (data.step > 1) {
steppedValue = steppedValue + (steppedValue % data.step);
}

No commit comments for this range

Something went wrong with that request. Please try again.