## 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"
没有合适的资源?快使用搜索试试~ 我知道了~
RedisFox 是基于 Golang 开发的 Redis 可视化监控工具
共124个文件
js:47个
less:37个
go:15个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 185 浏览量
2023-07-06
10:40:11
上传
评论
收藏 5.17MB ZIP 举报
温馨提示
RedisFox 是基于 Golang 开发的 Redis 可视化监控工具。Go 版本需要 >1.12,使用 go modlue 作为包依赖管理。使用 gosuv 驱动程序运行,目前 gosuv 仅支持 Linux
资源推荐
资源详情
资源评论
收起资源包目录
RedisFox 是基于 Golang 开发的 Redis 可视化监控工具 (124个子文件)
bootstrap.css 76KB
jsapi.css 6KB
qunit.css 4KB
.gitattributes 80B
.gitignore 2KB
.gitignore 15B
.gitignore 15B
sqliteprovide.go 6KB
monitor.go 3KB
conf.go 3KB
server.go 2KB
info.go 2KB
info.go 2KB
main.go 2KB
commands.go 1KB
topcommands.go 1KB
topkeys.go 1016B
memory.go 975B
dataprovider.go 919B
util.go 496B
serverlist.go 431B
probe.go 282B
gosuv 11.84MB
index.html 11KB
index.html 2KB
favicon.ico 4KB
chart.js 759KB
jquery.js 242KB
jquery-1.7.2.min.js 93KB
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
bootstrap-carousel.js 5KB
base-widget-view.js 4KB
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
commands-widget-view.js 2KB
bootstrap-alert.js 2KB
bootstrap-tooltip.js 2KB
memory-widget-view.js 2KB
bootstrap-dropdown.js 2KB
bootstrap-transition.js 2KB
app.js 2KB
top-keys-widget-view.js 1KB
bootstrap-tab.js 1KB
bootstrap-alert.js 1KB
top-commands-widget-view.js 1KB
info-widget-view.js 1KB
bootstrap-scrollspy.js 972B
bootstrap-collapse.js 843B
visualization.js 726B
serverlist-view.js 613B
bootstrap-transition.js 373B
info-widget-model.js 153B
top-commands-widget-model.js 124B
commands-widget-model.js 118B
top-keys-widget-model.js 116B
memory-widget-model.js 114B
serverlist-model.js 113B
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
共 124 条
- 1
- 2
资源评论
Java程序员-张凯
- 粉丝: 1w+
- 资源: 7353
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功