瀏覽代碼

Merge pull request #8 from andrewmackrodt/master

'switch' is a reserved keyword in ie8
Mattia Larentis 12 年之前
父節點
當前提交
511ffa3f56
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      static/js/jquery.switch.js

+ 2 - 2
static/js/jquery.switch.js

@@ -1,7 +1,7 @@
 !function ($) {
   "use strict";
 
-  $.fn.switch = function (method) {
+  $.fn['switch'] = function (method) {
     var methods = {
       init:function () {
         this.each(function () {
@@ -205,5 +205,5 @@
 }(jQuery);
 
 $(function () {
-  $('.switch').switch();
+  $('.switch')['switch']();
 });