Browse Source

Update static/js/jquery.switch.js

- Changed the insertion of the label to use html() instead so html code can also be used (for example, Font Awesome icons).
t3chn0r 12 năm trước cách đây
mục cha
commit
d8050f5317
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      static/js/jquery.switch.js

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

@@ -35,7 +35,7 @@
               .addClass("switch-left")
               .addClass(myClasses)
               .addClass(color)
-              .text(onLabel);
+              .html(onLabel);
 
             if ($element.data('off') !== undefined)
               color = "switch-" + $element.data('off');
@@ -44,7 +44,7 @@
               .addClass("switch-right")
               .addClass(myClasses)
               .addClass(color)
-              .text(offLabel);
+              .html(offLabel);
 
             $label = $('<label>')
               .html("&nbsp;")