Skip to content

Commit 58b6471

Browse files
committed
Updated to v3.0.0 ; Added touch support
minhur#177
1 parent 7b61214 commit 58b6471

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

js/bootstrap-toggle.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
* ========================================================================
55
* Copyright 2014 Min Hur, The New York Times Company
66
* Licensed under MIT
7-
* ======================================================================== */
7+
* ========================================================================
8+
* FORK: 20181017: https://github.com/gitbrent/bootstrap-toggle
9+
*/
810

911

1012
+function ($) {
@@ -19,7 +21,7 @@
1921
this.render()
2022
}
2123

22-
Toggle.VERSION = '2.2.0'
24+
Toggle.VERSION = '3.0.0'
2325

2426
Toggle.DEFAULTS = {
2527
on: 'On',
@@ -171,7 +173,7 @@
171173
$('input[type=checkbox][data-toggle^=toggle]').bootstrapToggle()
172174
})
173175

174-
$(document).on('click.bs.toggle', 'div[data-toggle^=toggle]', function(e) {
176+
$(document).on('touchstart.bs.toggle click.bs.toggle', 'div[data-toggle^=toggle]', function(e) {
175177
var $checkbox = $(this).find('input[type=checkbox]')
176178
$checkbox.bootstrapToggle('toggle')
177179
e.preventDefault()

0 commit comments

Comments
 (0)