Skip to content

Commit 8a2a323

Browse files
Default events if not exist
1 parent d31f500 commit 8a2a323

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

jquery-ui-sliderAccess.js

+5-3
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,9 @@
5050
curr = $t.slider('value'),
5151
newval = curr += step*1,
5252
minval = $t.slider('option','min'),
53-
maxval = $t.slider('option','max');
53+
maxval = $t.slider('option','max'),
54+
slidee = $t.slider("option", "slide") || function(){},
55+
stope = $t.slider("option", "stop") || function(){};
5456

5557
e.preventDefault();
5658

@@ -59,8 +61,8 @@
5961

6062
$t.slider('value', newval);
6163

62-
$t.slider("option", "slide").call($t, null, { value: newval });
63-
$t.slider("option", "stop").call($t, null, { value: newval });
64+
slidee.call($t, null, { value: newval });
65+
stope.call($t, null, { value: newval });
6466
});
6567
});
6668

0 commit comments

Comments
 (0)