mirror of
https://github.com/twbs/bootstrap.git
synced 2025-01-18 10:52:19 +01:00
Cache length variables.
This commit is contained in:
parent
5cce25d515
commit
82dd279656
@ -417,7 +417,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
||||
var dependencies = this.getAttribute('data-dependencies')
|
||||
if (!dependencies) return
|
||||
dependencies = dependencies.split(',')
|
||||
for (var i = 0; i < dependencies.length; i++) {
|
||||
for (var i = 0, len = dependencies.length; i < len; i++) {
|
||||
var $dependency = $('[value="' + dependencies[i] + '"]')
|
||||
$dependency && $dependency.prop('checked', true)
|
||||
}
|
||||
@ -428,7 +428,7 @@ window.onload = function () { // wait for load in a dumb way because B-0
|
||||
var dependents = this.getAttribute('data-dependents')
|
||||
if (!dependents) return
|
||||
dependents = dependents.split(',')
|
||||
for (var i = 0; i < dependents.length; i++) {
|
||||
for (var i = 0, len = dependents.length; i < len; i++) {
|
||||
var $dependent = $('[value="' + dependents[i] + '"]')
|
||||
$dependent && $dependent.prop('checked', false)
|
||||
}
|
||||
|
@ -42,7 +42,7 @@
|
||||
'delegate',
|
||||
'undelegate'
|
||||
]
|
||||
for (var i = 0; i < eventAliases.length; i++) {
|
||||
for (var i = 0, len = eventAliases.length; i < len; i++) {
|
||||
var eventAlias = eventAliases[i]
|
||||
$.fn[eventAlias] = function () {
|
||||
throw new Error('Using the ".' + eventAlias + '()" method is not allowed, so that Bootstrap can be compatible with custom jQuery builds which exclude the "event aliases" module that defines said method. See https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md#js')
|
||||
@ -125,7 +125,7 @@
|
||||
'test',
|
||||
'throws'
|
||||
];
|
||||
for (var i = 0; i < methodNames.length; i++) {
|
||||
for (var i = 0, len = methodNames.length; i < len; i++) {
|
||||
var methodName = methodNames[i];
|
||||
window[methodName] = undefined;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user