|
@@ -107,7 +107,7 @@
|
|
|
changeStatus($(this));
|
|
|
});
|
|
|
|
|
|
- $element.find('input').on('change', function (e) {
|
|
|
+ $element.find('input').on('change', function (e, skipOnChange) {
|
|
|
var $this = $(this)
|
|
|
, $element = $this.parent()
|
|
|
, thisState = $this.is(':checked')
|
|
@@ -126,6 +126,9 @@
|
|
|
if ($element.data('animated') !== false)
|
|
|
$element.addClass("switch-animate");
|
|
|
|
|
|
+ if (typeof skipOnChange === 'boolean' && skipOnChange)
|
|
|
+ return;
|
|
|
+
|
|
|
$element.parent().trigger('switch-change', {'el': $this, 'value': thisState})
|
|
|
}
|
|
|
});
|