## 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集群监控软件,方便部署,全方位监控
共149个文件
js:50个
less:37个
py:29个
5星 · 超过95%的资源 需积分: 50 12 下载量 107 浏览量
2018-07-10
12:14:57
上传
评论 1
收藏 724KB ZIP 举报
温馨提示
可以通过此工具实现Redis集群的完美监控,实时查看节点内存使用情况,以及keys的分布情况。非常好用。。。。
资源推荐
资源详情
资源评论
收起资源包目录
Redis集群监控软件,方便部署,全方位监控 (149个子文件)
redis_live.conf 2KB
redis7009.conf 910B
bootstrap.css 76KB
qunit.css 4KB
tooltip.css 2KB
style.css 2KB
reset.css 640B
dasdf 9KB
.gitignore 263B
index.html 15KB
overview.html 7KB
settings.html 2KB
index.html 2KB
corechart.js 434KB
jquery.js 242KB
jquery-1.7.2.min.js 93KB
jquery.min.js 84KB
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
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
memory-widget-view.js 2KB
top-keys-widget-view.js 2KB
top-commands-widget-view.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 532B
google.js 529B
bootstrap-transition.js 373B
info-widget-model.js 167B
top-commands-widget-model.js 120B
status-widget-model.js 119B
commands-widget-model.js 114B
top-keys-widget-model.js 112B
memory-widget-model.js 110B
serverlist-model.js 109B
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
badges.less 976B
tooltip.less 803B
widget.less 790B
thumbnails.less 665B
scaffolding.less 570B
pager.less 567B
wells.less 552B
accordion.less 511B
breadcrumbs.less 443B
hero-unit.less 404B
layouts.less 372B
close.less 308B
component-animations.less 269B
utilities.less 245B
grid.less 147B
共 149 条
- 1
- 2
资源评论
- bbg51992021-06-19嗯 是已测试使用通过
Ronney-Hua
- 粉丝: 48
- 资源: 7
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功