/* ======================================================================== * bootstrap-switch - v2.0.0 * http://www.bootstrap-switch.org * ======================================================================== * Copyright 2012-2013 Mattia Larentis * * ======================================================================== * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ======================================================================== */ (function() { (function($) { $.fn.bootstrapSwitch = function(method) { var methods; methods = { init: function() { return this.each(function() { var $div, $element, $form, $label, $switchLeft, $switchRight, $wrapper, changeState; $element = $(this); $switchLeft = $("", { "class": "switch-left", html: function() { var html, label; html = "ON"; label = $element.data("on-label"); if (label != null) { html = label; } return html; } }); $switchRight = $("", { "class": "switch-right", html: function() { var html, label; html = "OFF"; label = $element.data("off-label"); if (label != null) { html = label; } return html; } }); $label = $("