## 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"
没有合适的资源?快使用搜索试试~ 我知道了~
【WordPress插件】2022年最新版完整功能demo+插件v4.3.1.zip
共31个文件
png:15个
js:6个
css:5个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 38 浏览量
2022-04-01
03:23:21
上传
评论
收藏 565KB ZIP 举报
温馨提示
"【WordPress插件】2022年最新版完整功能demo+插件v4.3.1 Table Rate Shipping for WooCommerce Woocommerce的表率运输" ---------- 泰森云每天更新发布最新WordPress主题、HTML主题、WordPress插件、shopify主题、opencart主题、PHP项目源码、安卓项目源码、ios项目源码,更有超10000个资源可供选择,如有需要请站内联系。
资源推荐
资源详情
资源评论
收起资源包目录
【WordPress插件】2022年最新版完整功能demo+插件v4.3.1.zip (31个子文件)
documentation
assets
css
bootstrap.css 124KB
documentation.css 656B
documenter_style.css 2KB
bootstrap-responsive.css 22KB
images
image_2.png 7KB
image_1.png 29KB
image_3.png 14KB
image_4.png 66KB
image_5.png 143KB
img
glyphicons-halflings.png 14KB
glyphicons-halflings-white.png 9KB
glyphicons
glyphicons_163_iphone.png 172B
glyphicons_214_resize_small.png 301B
glyphicons_155_show_thumbnails.png 117B
glyphicons_082_roundabout.png 345B
glyphicons_009_magic.png 316B
glyphicons_042_group.png 305B
glyphicons_266_book_open.png 292B
glyphicons_079_podium.png 213B
js
jquery.js 242KB
scripts.js 2KB
jquery.scrollTo.js 2KB
bootstrap-min.js 28KB
jquery.easing.js 8KB
google-code-prettify
prettify.js 13KB
prettify.css 815B
README.md 3KB
index.html 29KB
Licensing
GPL.txt 34KB
README_License.txt 414B
woocommerce-table-rate-shipping.zip 147KB
共 31 条
- 1
资源评论
Lee达森
- 粉丝: 958
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- MFC 列表控件修改实例
- 基于MATLAB光学三维重构中的菱形展开算法 .rar
- 基于MATLAB光学三维重构中的时间相位展开算法+文档.rar
- 基于matlab实现的 Crust 算法的三维点云重构物体表面程序.rar
- 基于matlab的小波包分解应用于机械振动信号的故障分析.rar
- 基于matlab实现的hough变换检测直线,检测直线之后用颜色标记出来.rar
- ESP8266通过MQTT协议将温湿度数据传输至OnenNet云平台源码+详细说明.zip
- 基于matlab实现的 分析机械力学中的工程振动问题,实例1 .rar
- Java期末考试复习笔记
- 基于matlab实现的NSGA2遗传算法的地铁隧道上方基坑工程优化设计.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功