## 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 now 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 effect all instance's 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 it's 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"
没有合适的资源?快使用搜索试试~ 我知道了~
口福科技餐饮美食系统.zip
共831个文件
gif:259个
php:235个
html:163个
0 下载量 79 浏览量
2023-03-16
14:10:12
上传
评论
收藏 3.85MB ZIP 举报
温馨提示
口福科技餐饮美食系统.zip
资源推荐
资源详情
资源评论
收起资源包目录
口福科技餐饮美食系统.zip (831个子文件)
bootstrap.css 94KB
jquery.mobile.css 48KB
style.css 26KB
docs.css 17KB
bootstrap-responsive.css 12KB
sexy-bookmarks-style.css 12KB
ui.css 10KB
ui.css 10KB
ui.css 10KB
ui.css 9KB
ui.css 9KB
basic.css 7KB
basic.css 7KB
styles.css 6KB
comment.css 6KB
skitter.styles.css 5KB
zebra_datepicker.css 4KB
css.css 4KB
css.css 4KB
highlight.black.css 2KB
highlight.css 2KB
iframe.css 2KB
iframe.css 2KB
iframe.css 2KB
iframe.css 2KB
agile-uploader.css 2KB
iframe.css 2KB
css.css 2KB
multiupload.css 1KB
prettify.css 815B
unrelated.css 625B
newmsg.data 0B
newmsg.data 0B
crazy.gif 8KB
angry.gif 8KB
doubt.gif 7KB
wronged.gif 6KB
icons.gif 5KB
curse.gif 5KB
icons.gif 5KB
icons.gif 5KB
icons.gif 5KB
icons.gif 5KB
sleep.gif 5KB
quiet.gif 4KB
panic.gif 4KB
ohmy.gif 4KB
shutup.gif 4KB
awkward.gif 4KB
shy.gif 3KB
9.gif 3KB
wail.gif 3KB
fastcry.gif 3KB
cute.gif 2KB
logo.gif 2KB
logo.gif 2KB
tongue.gif 2KB
proud.gif 2KB
btn.gif 2KB
btn.gif 2KB
5.gif 2KB
cry.gif 2KB
smile.gif 2KB
titter.gif 2KB
envy.gif 2KB
bye.gif 2KB
struggle.gif 2KB
despise.gif 2KB
laugh.gif 2KB
22.gif 2KB
knock.gif 2KB
sad.gif 2KB
alipay.gif 1KB
loading.gif 1KB
loading.gif 1KB
loading.gif 1KB
loading.gif 1KB
loading.gif 1KB
24.gif 1KB
mad.gif 1KB
add.gif 1KB
23.gif 1KB
close.gif 1KB
20.gif 1KB
17.gif 1KB
18.gif 1KB
15.gif 1KB
16.gif 1KB
menu-bg.gif 1KB
menu-bg.gif 1KB
19.gif 1KB
37.gif 1KB
10.gif 1KB
2.gif 1KB
12.gif 1KB
32.gif 1KB
3.gif 1KB
4.gif 1KB
11.gif 1KB
14.gif 1KB
共 831 条
- 1
- 2
- 3
- 4
- 5
- 6
- 9
资源评论
qq_38220914
- 粉丝: 605
- 资源: 4312
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 2c60fbb3dt9ad50ed8864298eea1484b.MP4
- 基于yolov8+dlib实现视觉识别的安全驾驶监测系统部署到jetson NX平台源码+模型.zip
- Qt框架+OpenCV+动态爱心+编程教学+520
- 基于opencv+yolov8实现目标追踪及驻留时长统计源码.zip
- 水稻病害基于Yolov8算法优化目标检测识别与AI辅助决策python源码+模型+使用说明.zip
- 海尔618算价表_七海5.20_16.00xlsx(1)(2).xlsx
- WebCrawler.scr
- 【计算机专业毕业设计】大学生就业信息管理系统设计源码.zip
- YOLO 数据集:8种路面缺陷病害检测【包含划分好的数据集、类别class文件、数据可视化脚本】
- JAVA实现Modbus RTU或Modbus TCPIP案例.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功