bootstrap-toggle-master

所属分类:嵌入式Linux
开发工具:Asm
文件大小:124KB
下载次数:1
上传日期:2019-05-27 18:44:45
上 传 者sahand76
说明:  this is pcb mayble maybe not baby

文件列表:
Gruntfile.js (696, 2016-03-18)
LICENSE (1106, 2016-03-18)
bower.json (695, 2016-03-18)
css (0, 2016-03-18)
css\bootstrap-toggle.css (1819, 2016-03-18)
css\bootstrap-toggle.min.css (1590, 2016-03-18)
css\bootstrap2-toggle.css (1810, 2016-03-18)
css\bootstrap2-toggle.min.css (1582, 2016-03-18)
doc (0, 2016-03-18)
doc\header.png (89486, 2016-03-18)
doc\nyt.png (5022, 2016-03-18)
doc\nytdev.svg (20982, 2016-03-18)
doc\script.js (1301, 2016-03-18)
doc\stylesheet.css (1605, 2016-03-18)
index.html (18872, 2016-03-18)
js (0, 2016-03-18)
js\bootstrap-toggle.js (5538, 2016-03-18)
js\bootstrap-toggle.min.js (4129, 2016-03-18)
js\bootstrap-toggle.min.js.map (4106, 2016-03-18)
js\bootstrap2-toggle.js (5527, 2016-03-18)
js\bootstrap2-toggle.min.js (4119, 2016-03-18)
js\bootstrap2-toggle.min.js.map (4094, 2016-03-18)
package.json (751, 2016-03-18)

# Bootstrap Toggle Bootstrap Toggle is a highly flexible Bootstrap plugin that converts checkboxes into toggles. Visit http://www.bootstraptoggle.com for demos. ## Getting Started ### Installation You can [download](https://github.com/minhur/bootstrap-toggle/archive/master.zip) the latest version of Bootstrap Toggle or use CDN to load the library. `Warning` If you are using Bootstrap v2.3.2, use `bootstrap2-toggle.min.js` and `bootstrap2-toggle.min.css` instead. ```html ``` ### Bower Install ```bash bower install bootstrap-toggle ``` ## Usage ### Basic example Simply add `data-toggle="toggle"` to convert checkboxes into toggles. ```html ``` ### Stacked checkboxes Refer to Bootstrap Form Controls documentation to create stacked checkboxes. Simply add `data-toggle="toggle"` to convert checkboxes into toggles. ```html
``` ### Inline Checkboxes Refer to Bootstrap Form Controls documentation to create inline checkboxes. Simply add `data-toggle="toggle"` to a convert checkboxes into toggles. ```html ``` ## API ### Initialize by JavaScript Initialize toggles with id `toggle-one` with a single line of JavaScript. ```html ``` ### Options Options can be passed via data attributes or JavaScript. For data attributes, append the option name to `data-`, as in `data-on="Enabled"`. ```html ``` Name|Type|Default|Description| ---|---|---|--- on|string/html|"On"|Text of the on toggle off|string/html|"Off"|Text of the off toggle size|string|"normal"|Size of the toggle. Possible values are `large`, `normal`, `small`, `mini`. onstyle|string|"primary"|Style of the on toggle. Possible values are `default`, `primary`, `success`, `info`, `warning`, `danger` offstyle|string|"default"|Style of the off toggle. Possible values are `default`, `primary`, `success`, `info`, `warning`, `danger` style|string| |Appends the value to the class attribute of the toggle. This can be used to apply custom styles. Refer to Custom Styles for reference. width|integer|*null*|Sets the width of the toggle. if set to *null*, width will be calculated. height|integer|*null*|Sets the height of the toggle. if set to *null*, height will be calculated. ### Methods Methods can be used to control toggles directly. ```html ``` Method|Example|Description ---|---|--- initialize|$('#toggle-demo').bootstrapToggle()|Initializes the toggle plugin with options destroy|$('#toggle-demo').bootstrapToggle('destroy')|Destroys the toggle on|$('#toggle-demo').bootstrapToggle('on')|Sets the toggle to 'On' state off|$('#toggle-demo').bootstrapToggle('off')|Sets the toggle to 'Off' state toggle|$('#toggle-demo').bootstrapToggle('toggle')|Toggles the state of the toggle enable|$('#toggle-demo').bootstrapToggle('enable')|Enables the toggle disable|$('#toggle-demo').bootstrapToggle('disable')|Disables the toggle ## Events ### Event Propagation Note All events are propagated to and from input element to the toggle. You should listen to events from the `` directly rather than look for custom events. ```html
``` ### API vs Input This also means that using the API or Input to trigger events will work both ways. ```html ``` ### Integration #### [KnockoutJS](http://knockoutjs.com) A binding for knockout is available here: [aAXEe/knockout-bootstrap-toggle](https://github.com/aAXEe/knockout-bootstrap-toggle) ## Demos Visit http://www.bootstraptoggle.com for demos.

近期下载者

相关文件


收藏者