|
@@ -283,6 +283,28 @@
|
|
return this.$element;
|
|
return this.$element;
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+ BootstrapSwitch.prototype.onInit = function(value) {
|
|
|
|
+ if (typeof value === "undefined") {
|
|
|
|
+ return this.options.onInit;
|
|
|
|
+ }
|
|
|
|
+ if (!value) {
|
|
|
|
+ value = $.fn.bootstrapSwitch.defaults.onInit;
|
|
|
|
+ }
|
|
|
|
+ this.options.onInit = value;
|
|
|
|
+ return this.$element;
|
|
|
|
+ };
|
|
|
|
+
|
|
|
|
+ BootstrapSwitch.prototype.onSwitchChange = function(value) {
|
|
|
|
+ if (typeof value === "undefined") {
|
|
|
|
+ return this.options.onSwitchChange;
|
|
|
|
+ }
|
|
|
|
+ if (!value) {
|
|
|
|
+ value = $.fn.bootstrapSwitch.defaults.onSwitchChange;
|
|
|
|
+ }
|
|
|
|
+ this.options.onSwitchChange = value;
|
|
|
|
+ return this.$element;
|
|
|
|
+ };
|
|
|
|
+
|
|
BootstrapSwitch.prototype.destroy = function() {
|
|
BootstrapSwitch.prototype.destroy = function() {
|
|
var $form;
|
|
var $form;
|
|
$form = this.$element.closest("form");
|
|
$form = this.$element.closest("form");
|