## 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"
没有合适的资源?快使用搜索试试~ 我知道了~
HTML5响应式商业模板英文名Agency是一个简洁的HTML5响应式商业网站模板
共147个文件
png:70个
js:23个
jpg:18个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 155 浏览量
2023-02-17
18:24:31
上传
评论
收藏 5.35MB RAR 举报
温馨提示
HTML5响应式商业模板英文名Agency是一个简洁的HTML5响应式商业网站模板,使用了 Twitter Bootstrap框架搭建。.rar
资源推荐
资源详情
资源评论
收起资源包目录
HTML5响应式商业模板英文名Agency是一个简洁的HTML5响应式商业网站模板 (147个子文件)
bootstrap.css 109KB
docs.css 45KB
prettyPhoto.css 19KB
bootstrap-responsive.css 18KB
prettify.css 817B
Thumbs.db 11KB
Thumbs.db 11KB
Thumbs.db 9KB
Thumbs.db 9KB
loader.gif 6KB
loader.gif 2KB
loader.gif 2KB
loader.gif 2KB
loader.gif 2KB
loader.gif 2KB
default_thumbnail.gif 227B
default_thumbnail.gif 227B
default_thumbnail.gif 227B
default_thumbnail.gif 227B
default_thumbnail.gif 227B
components.html 52KB
blog.html 24KB
blog-single.html 16KB
index.html 16KB
work-two-columns.html 15KB
work.html 15KB
work-three-columns.html 13KB
faq.html 10KB
pricing.html 10KB
pricing-three-columns.html 9KB
contact.html 9KB
work-details.html 9KB
favicon.ico 1KB
banner-2.jpg 924KB
banner-3.jpg 674KB
work6.jpg 421KB
work7.jpg 394KB
home-banner-bg.jpg 356KB
home-banner-bg3.jpg 323KB
work4.jpg 320KB
work5.jpg 302KB
work3.jpg 259KB
work8.jpg 207KB
work1.jpg 179KB
home-banner-bg2.jpg 143KB
bootstrap-mdo-sfmoma-01.jpg 122KB
work2.jpg 105KB
bootstrap-mdo-sfmoma-02.jpg 79KB
bootstrap-mdo-sfmoma-03.jpg 48KB
work-thumb.jpg 17KB
avatar.jpg 1KB
jquery.js 93KB
bootstrap.js 55KB
custom.js 38KB
bootstrap.min.js 25KB
jquery.prettyPhoto.js 24KB
jquery.isotope.min.js 16KB
prettify.js 13KB
bootstrap-tooltip.js 8KB
bootstrap-typeahead.js 7KB
bootstrap-modal.js 6KB
bootstrap-carousel.js 5KB
bootstrap-collapse.js 4KB
bootstrap-scrollspy.js 4KB
bootstrap-dropdown.js 4KB
application.js 4KB
superfish.js 4KB
bootstrap-tab.js 3KB
contact.js 3KB
bootstrap-affix.js 3KB
bootstrap-popover.js 3KB
bootstrap-button.js 3KB
bootstrap-alert.js 2KB
bootstrap-transition.js 2KB
README.md 3KB
README.md 46B
contact.php 3KB
soundready.png 49KB
kippt.png 46KB
bg_body-noise.png 43KB
fleetio.png 39KB
bg_footer.png 24KB
apple-touch-icon-144-precomposed.png 16KB
glyphicons-halflings.png 12KB
apple-touch-icon-114-precomposed.png 11KB
glyphicons-halflings-white.png 9KB
jshint.png 7KB
personal-projects.png 7KB
sprite.png 7KB
bs-docs-masthead-pattern.png 6KB
blog-title-bg2.png 6KB
apple-touch-icon-72-precomposed.png 6KB
3.png 6KB
2.png 5KB
4.png 5KB
flexible-hours.png 5KB
1.png 5KB
sprite.png 4KB
sprite.png 4KB
sprite.png 4KB
共 147 条
- 1
- 2
资源评论
reg183
- 粉丝: 1817
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 基于Javascript和微信小程序的Anna设计源码
- 基于Java的仿制品设计源码 - bilibili
- 基于Javascript的影视动画设计源码 - cad
- 基于Java和深度学习的瓦斯浓度预测系统后端设计源码 - 瓦斯浓度预测后端
- Screenshot_20240528_103010.jpg
- 基于Python的新能源承载力计算及界面设计源码 - HAINING-DG
- 基于Java的本科探索学习项目设计源码 - 本科探索
- 基于Javascript和Python的微商城项目设计源码 - MicroMall
- 基于Java的网上订餐系统设计源码 - online ordering system
- 基于Javascript的超级美眉网络资源管理应用模块设计源码
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功