Просмотр исходного кода

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 лет назад
Родитель
Сommit
d8050f5317
1 измененных файлов с 2 добавлено и 2 удалено
  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;")