var locastyle = locastyle || {};

locastyle.switchButton = (function() {
  'use strict';

})();

@@ -83,14 +83,612 @@
 rict';%0A%0A
+  var config = %7B%0A    switchButton: '.ls-switch-btn',%0A    openedClass: 'ls-switch-btn-active'%0A  %7D;%0A%0A  function init() %7B%0A    bindEventOnChange();%0A  %7D%0A%0A  function bindEventOnChange() %7B%0A    $(config.switchButton).on('click.ls', function(e) %7B%0A      eventHandler($(this));%0A      e.stopPropagation();%0A    %7D);%0A  %7D%0A%0A  function eventHandler(el) %7B%0A    if (el.find('input%5Btype=checkbox%5D').prop('checked')) %7B%0A      el.trigger('switchButton:actived').addClass(config.openedClass);%0A    %7D else %7B%0A      el.trigger('switchButton:disabled').removeClass(config.openedClass);%0A    %7D%0A  %7D%0A%0A  return %7B%0A    init: init%0A  %7D;%0A%0A
 %7D)();%0A

Switch button event.