/*! ============================================================ * bootstrap-switch v1.9.0 by Larentis Mattia @SpiritualGuru * http://www.larentis.eu/ * * Enhanced for radiobuttons by Stein, Peter @BdMdesigN * http://www.bdmdesign.org/ * * Project site: * http://www.bootstrap-switch.org * ============================================================ * Licensed under the Apache License, Version 2.0 * http://www.apache.org/licenses/LICENSE-2.0 * ============================================================ */ (function() { (function($) { $.fn.bootstrapSwitch = function(method) { var methods; methods = { init: function() { return this.each(function() { var $div, $element, $form, $label, $switchLeft, $switchRight, $wrapper, changeStatus; $element = $(this); $switchLeft = $("", { "class": "switch-left", html: function() { var html, label; html = "ON"; label = $element.data("on-label"); if (typeof label !== "undefined") { html = label; } return html; } }); $switchRight = $("", { "class": "switch-right", html: function() { var html, label; html = "OFF"; label = $element.data("off-label"); if (typeof label !== "undefined") { html = label; } return html; } }); $label = $("