## 2.0 BOOTSTRAP JS PHILOSOPHY
These are the high-level design rules which guide the development of Bootstrap's plugin apis.
---
### DATA-ATTRIBUTE API
We believe you should be able to use all plugins provided by Bootstrap purely through the markup API without writing a single line of javascript.
We acknowledge that this isn't always the most performant and sometimes it may be desirable to turn this functionality off altogether. Therefore, as of 2.0 we provide the ability to disable the data attribute API by unbinding all events on the body namespaced with `'data-api'`. This looks like this:
$('body').off('.data-api')
To target a specific plugin, just include the plugins name as a namespace along with the data-api namespace like this:
$('body').off('.alert.data-api')
---
### PROGRAMATIC API
We also believe you should be able to use all plugins provided by Bootstrap purely through the JS API.
All public APIs should be single, chainable methods, and return the collection acted upon.
$(".btn.danger").button("toggle").addClass("fat")
All methods should accept an optional options object, a string which targets a particular method, or null which initiates the default behavior:
$("#myModal").modal() // initialized with defaults
$("#myModal").modal({ keyboard: false }) // initialized with no keyboard
$("#myModal").modal('show') // initializes and invokes show immediately afterqwe2
---
### OPTIONS
Options should be sparse and add universal value. We should pick the right defaults.
All plugins should have a default object which can be modified to affect all instances' default options. The defaults object should be available via `$.fn.plugin.defaults`.
$.fn.modal.defaults = { … }
An options definition should take the following form:
*noun*: *adjective* - describes or modifies a quality of an instance
examples:
backdrop: true
keyboard: false
placement: 'top'
---
### EVENTS
All events should have an infinitive and past participle form. The infinitive is fired just before an action takes place, the past participle on completion of the action.
show | shown
hide | hidden
---
### CONSTRUCTORS
Each plugin should expose its raw constructor on a `Constructor` property -- accessed in the following way:
$.fn.popover.Constructor
---
### DATA ACCESSOR
Each plugin stores a copy of the invoked class on an object. This class instance can be accessed directly through jQuery's data API like this:
$('[rel=popover]').data('popover') instanceof $.fn.popover.Constructor
---
### DATA ATTRIBUTES
Data attributes should take the following form:
- data-{{verb}}={{plugin}} - defines main interaction
- data-target || href^=# - defined on "control" element (if element controls an element other than self)
- data-{{noun}} - defines class instance options
examples:
// control other targets
data-toggle="modal" data-target="#foo"
data-toggle="collapse" data-target="#foo" data-parent="#bar"
// defined on element they control
data-spy="scroll"
data-dismiss="modal"
data-dismiss="alert"
data-toggle="dropdown"
data-toggle="button"
data-toggle="buttons-checkbox"
data-toggle="buttons-radio"
没有合适的资源?快使用搜索试试~ 我知道了~
Redis高可用管理后台系统.zip
共428个文件
py:213个
pyc:56个
js:46个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 15 浏览量
2023-07-19
12:59:02
上传
评论
收藏 3.69MB ZIP 举报
温馨提示
Redis高可用管理后台系统
资源推荐
资源详情
资源评论
收起资源包目录
Redis高可用管理后台系统.zip (428个子文件)
_debugsupport.c 1KB
options_test.cfg 18B
redis_live.conf 2KB
redis7009.conf 910B
redis7008.conf 910B
ca-certificates.crt 218KB
test.crt 866B
bootstrap.css 76KB
style.css 6KB
qunit.css 4KB
tooltip.css 2KB
style.css 2KB
reset.css 640B
fr_FR.csv 19B
FONT_LICENSE 5KB
zoneinfo--latest.tar.gz 85KB
index.html 15KB
overview.html 7KB
settings.html 2KB
index.html 2KB
syntaxerror.html 51B
broken.html 29B
utf8.html 8B
test.html 5B
test.html 5B
6.jpg 623KB
5.jpg 452KB
3.jpg 335KB
2.jpg 224KB
4.jpg 218KB
1.jpg 146KB
corechart.js 434KB
jquery.js 242KB
jquery-1.7.2.min.js 93KB
jquery.min.js 84KB
jquery.js 77KB
handlebars-1.0.0.beta.6.js 49KB
less-1.3.0.min.js 46KB
qunit.js 37KB
jsapi.js 24KB
backbone-min.js 16KB
underscore-min.js 13KB
bootstrap-tooltip.js 7KB
bootstrap-typeahead.js 7KB
debugger.js 6KB
bootstrap-modal.js 5KB
commands-widget-view.js 5KB
bootstrap-carousel.js 5KB
base-widget-view.js 5KB
bootstrap-typeahead.js 4KB
bootstrap-collapse.js 4KB
bootstrap-scrollspy.js 4KB
bootstrap-popover.js 3KB
bootstrap-tab.js 3KB
bootstrap-popover.js 3KB
bootstrap-button.js 3KB
bootstrap-button.js 3KB
bootstrap-modal.js 3KB
bootstrap-dropdown.js 2KB
bootstrap-alert.js 2KB
bootstrap-tooltip.js 2KB
bootstrap-dropdown.js 2KB
bootstrap-transition.js 2KB
bootstrap-tab.js 1KB
bootstrap-alert.js 1KB
app.js 1KB
info-widget-view.js 1KB
serverlist-view.js 992B
bootstrap-scrollspy.js 972B
bootstrap-collapse.js 843B
status-widget-view.js 556B
google.js 529B
bootstrap-transition.js 373B
info-widget-model.js 167B
status-widget-model.js 126B
commands-widget-model.js 114B
serverlist-model.js 109B
test.key 932B
mixins.less 19KB
forms.less 11KB
sprites.less 8KB
navbar.less 7KB
responsive.less 7KB
navs.less 7KB
variables.less 6KB
button-groups.less 4KB
buttons.less 4KB
tables.less 4KB
type.less 4KB
dropdowns.less 3KB
reset.less 2KB
progress-bars.less 2KB
modals.less 2KB
carousel.less 2KB
bootstrap.less 1KB
code.less 1KB
popovers.less 1KB
labels.less 1KB
pagination.less 1KB
alerts.less 1KB
共 428 条
- 1
- 2
- 3
- 4
- 5
资源评论
GeekyGuru
- 粉丝: 1727
- 资源: 1099
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功