## 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')
---
### PROGRAMMATIC 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
共203个文件
java:104个
png:38个
js:20个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 144 浏览量
2023-03-11
09:56:23
上传
评论
收藏 2.9MB ZIP 举报
温馨提示
免责声明:资料部分来源于合法的互联网渠道收集和整理,部分自己学习积累成果,供大家学习参考与交流。收取的费用仅用于收集和整理资料耗费时间的酬劳。 本人尊重原创作者或出版方,资料版权归原作者或出版方所有,本人不对所涉及的版权问题或内容负法律责任。如有侵权,请举报或通知本人删除。
资源推荐
资源详情
资源评论
收起资源包目录
小程序源码 超级课程表(仿版).zip (203个子文件)
bootstrap.css 124KB
docs.css 22KB
bootstrap-responsive.css 22KB
index.css 1KB
key_gen.dat 141B
.gitignore 138B
.gitignore 9B
romeschedule.html 123KB
studyschedule.html 115KB
currcourse.html 24KB
evaList.html 22KB
evaItem.html 21KB
partialEvaList.html 21KB
exam.html 3KB
hello.html 219B
index.html 156B
favicon.ico 1KB
lifedjtu.iml 7KB
JWLocalServiceImpl.java 36KB
JWRemoteServiceImpl.java 25KB
JWUpdateCacheAsyncerImpl.java 17KB
WebserviceSecureAction.java 16KB
LifeDjtuDaoImpl.java 15KB
Extractor.java 15KB
JWUpdateCacheSchedulerImpl.java 12KB
URLFetcher.java 11KB
LifeDjtuFetchUrl.java 10KB
LifeDjtuDao.java 9KB
EntityObject.java 8KB
LifeDjtuUtil.java 6KB
JWLocalService.java 6KB
WebserviceAction.java 6KB
InfoProcessHub.java 5KB
Filter.java 5KB
EncryptAES.java 5KB
JWRemotePatchServiceImpl.java 5KB
ScoreDto.java 4KB
User.java 4KB
CourseInstance.java 3KB
CourseDto.java 3KB
JsonResult.java 3KB
StudentRegistry.java 3KB
FriendPending.java 2KB
UserValidateInterceptor.java 2KB
InstantMessage.java 2KB
ExamInstance.java 2KB
DomElement.java 2KB
RoomInfoDto.java 2KB
JWRemoteService.java 2KB
CriteriaWrapper.java 2KB
LifeDjtuEnum.java 2KB
Room.java 2KB
CourseRecordDto.java 2KB
MainWebServiceAction.java 2KB
UserCourse.java 2KB
Building.java 2KB
Area.java 2KB
Course.java 2KB
RoomTakenItem.java 2KB
ExamDto.java 2KB
ProjectCodeLinesAnalyser.java 2KB
UpdateWrapper.java 2KB
FetchResponse.java 1KB
EncryptMD5.java 1KB
ArticleDto.java 1KB
DjtuDate.java 1KB
QueryWrapper.java 1KB
IMGroupUser.java 1KB
Friend.java 1KB
IMGroup.java 1KB
EvaEntry.java 1KB
Pageable.java 1KB
SystemNotice.java 1KB
Crypto.java 1KB
JWUpdateCacheScheduler.java 1KB
Sortable.java 1KB
ParamMapper.java 1KB
MainAction.java 1KB
CourseRow.java 1024B
JWUpdateCacheAsyncer.java 1020B
ProjectionWrapper.java 1016B
LifeDjtuAction.java 994B
Tag.java 979B
Exam.java 968B
LifeDjtuConfig.java 943B
CourseTakenItem.java 929B
LocalResult.java 891B
CoursePatch.java 888B
Tuple.java 868B
ServiceAround.java 845B
TagSelectorPair.java 780B
GroupDto.java 748B
UpdateEntry.java 729B
RoomWeekInfo.java 726B
RoomDto.java 719B
EvaList.java 699B
ExamTimeEntry.java 693B
RoomDayInfo.java 661B
BuildingDto.java 624B
MapMaker.java 585B
共 203 条
- 1
- 2
- 3
资源评论
金枝玉叶9
- 粉丝: 195
- 资源: 7637
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功