浏览代码

Updated doc and readme

Francesco Pontillo 11 年之前
父节点
当前提交
8dfd609361
共有 2 个文件被更改,包括 7 次插入0 次删除
  1. 2 0
      README.md
  2. 5 0
      examples/index.html

+ 2 - 0
README.md

@@ -211,6 +211,8 @@ $('#mySwitch').bootstrapSwitch('setState', true);
 $('#mySwitch').bootstrapSwitch('setState', true || false, true); // sets the state without getting the switch-change event
 $('#mySwitch').bootstrapSwitch('setOnLabel', onValue); // sets the text of the "on" label
 $('#mySwitch').bootstrapSwitch('setOffLabel', offValue); // sets the text of the "off" label
+$('#mySwitch').bootstrapSwitch('setTextLabel', labelValue); // sets the text of the middle label
+$('#mySwitch').bootstrapSwitch('setIconLabel', iconValue); // sets the icon of the middle label
 $('#mySwitch').bootstrapSwitch('setOnClass', onClass); // sets the left color class
 $('#mySwitch').bootstrapSwitch('setOffClass', offClass); // sets the right color class
 $('#mySwitch').bootstrapSwitch('setAnimated', animated); // sets true or false for animation

+ 5 - 0
examples/index.html

@@ -344,6 +344,9 @@ $('#label-switch').bootstrapSwitch('setOffLabel', 'O');</pre>
 &lt;div class="make-switch" data-text-label="TV">
     &lt;input type="checkbox" checked>
 &lt;/div></pre>
+            <pre class="prettyprint linenums">
+$('#label-text-switch').bootstrapSwitch('setTextLabel', 'Radio');</pre>
+        </div>
         </div>
     </div>
 
@@ -405,6 +408,8 @@ $('#label-switch').bootstrapSwitch('setOffLabel', 'O');</pre>
 &lt;div class="make-switch" data-label-icon="fui-video" data-on-label="&lt;i class='fui-check icon-white'>&lt;/i>" data-off-label="&lt;i class='fui-cross'>&lt;/i>">
     &lt;input type="checkbox" checked>
 &lt;/div></pre>
+            <pre class="prettyprint linenums">
+$('#label-icon-switch').bootstrapSwitch('setIconLabel', 'icon-remove');</pre>
         </div>
     </div>