## 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"
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
Doubango 推出了“世界上第一个HTML5 SIP客户端”:SipML5,实现了基于Chrome的SIP客户端,并与自己先前的开源产品Idoubs和IMSDroid实现互通。就像主页里的两个Demo视频显示的一样,你可以轻松实现Chrome和iOS/Android移动设备之间的实时视音频通话。 SipML5使用Chrome的实验功能WebRTC实现媒体功能,并用JavaScript封装了一个完整强大的javascript SIP/SDP stack 完成信令的管理,传输层通过Websocket与服务端Gateway通信接入SIP Server,最终通过Video TAG播放视音频内容。
资源推荐
资源详情
资源评论
收起资源包目录
sipml5世界上第一个HTML5 SIP客户端 (1658个子文件)
asterisk.adsi 3KB
telcordia-1.adsi 1KB
extensions.ael 12KB
all-wcprops 10KB
all-wcprops 5KB
all-wcprops 4KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 2KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1KB
all-wcprops 1024B
all-wcprops 981B
all-wcprops 966B
all-wcprops 948B
all-wcprops 942B
all-wcprops 914B
all-wcprops 897B
all-wcprops 891B
all-wcprops 829B
all-wcprops 808B
all-wcprops 780B
all-wcprops 636B
all-wcprops 612B
all-wcprops 576B
all-wcprops 550B
all-wcprops 547B
all-wcprops 532B
all-wcprops 506B
all-wcprops 500B
all-wcprops 492B
all-wcprops 480B
all-wcprops 474B
all-wcprops 474B
all-wcprops 468B
all-wcprops 468B
all-wcprops 462B
all-wcprops 428B
all-wcprops 422B
all-wcprops 396B
all-wcprops 394B
all-wcprops 361B
all-wcprops 359B
all-wcprops 357B
all-wcprops 356B
all-wcprops 347B
all-wcprops 335B
all-wcprops 325B
all-wcprops 315B
all-wcprops 313B
all-wcprops 297B
all-wcprops 294B
all-wcprops 278B
all-wcprops 196B
all-wcprops 190B
all-wcprops 190B
all-wcprops 170B
all-wcprops 170B
all-wcprops 168B
all-wcprops 168B
all-wcprops 168B
all-wcprops 168B
all-wcprops 164B
all-wcprops 164B
all-wcprops 156B
all-wcprops 140B
all-wcprops 88B
all-wcprops 79B
all-wcprops 78B
all-wcprops 76B
all-wcprops 71B
all-wcprops 65B
all-wcprops 63B
all-wcprops 58B
classes.bmp 3.46MB
classes.bmp 3.46MB
sip.conf 86KB
chan_dahdi.conf 61KB
extensions.conf 31KB
iax.conf 25KB
queues.conf 25KB
indications.conf 24KB
voicemail.conf 23KB
confbridge.conf 22KB
say.conf 17KB
features.conf 15KB
共 1658 条
- 1
- 2
- 3
- 4
- 5
- 6
- 17
资源评论
- beike3212019-05-10学习一下,下载看看。
Raven.Java
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功