Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
bootstrap
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
bootstrap
Commits
e1f6458e
Commit
e1f6458e
authored
Sep 27, 2012
by
Carl Porth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't wait for ready when binding events to document
parent
474471b8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
62 deletions
+45
-62
js/bootstrap-alert.js
js/bootstrap-alert.js
+1
-3
js/bootstrap-button.js
js/bootstrap-button.js
+4
-6
js/bootstrap-carousel.js
js/bootstrap-carousel.js
+6
-8
js/bootstrap-collapse.js
js/bootstrap-collapse.js
+8
-10
js/bootstrap-dropdown.js
js/bootstrap-dropdown.js
+5
-8
js/bootstrap-modal.js
js/bootstrap-modal.js
+13
-15
js/bootstrap-tab.js
js/bootstrap-tab.js
+3
-5
js/bootstrap-typeahead.js
js/bootstrap-typeahead.js
+5
-7
No files found.
js/bootstrap-alert.js
View file @
e1f6458e
...
...
@@ -83,8 +83,6 @@
/* ALERT DATA-API
* ============== */
$
(
function
()
{
$
(
document
).
on
(
'
click.alert.data-api
'
,
dismiss
,
Alert
.
prototype
.
close
)
})
$
(
document
).
on
(
'
click.alert.data-api
'
,
dismiss
,
Alert
.
prototype
.
close
)
}(
window
.
jQuery
);
\ No newline at end of file
js/bootstrap-button.js
View file @
e1f6458e
...
...
@@ -85,12 +85,10 @@
/* BUTTON DATA-API
* =============== */
$
(
function
()
{
$
(
document
).
on
(
'
click.button.data-api
'
,
'
[data-toggle^=button]
'
,
function
(
e
)
{
var
$btn
=
$
(
e
.
target
)
if
(
!
$btn
.
hasClass
(
'
btn
'
))
$btn
=
$btn
.
closest
(
'
.btn
'
)
$btn
.
button
(
'
toggle
'
)
})
$
(
document
).
on
(
'
click.button.data-api
'
,
'
[data-toggle^=button]
'
,
function
(
e
)
{
var
$btn
=
$
(
e
.
target
)
if
(
!
$btn
.
hasClass
(
'
btn
'
))
$btn
=
$btn
.
closest
(
'
.btn
'
)
$btn
.
button
(
'
toggle
'
)
})
}(
window
.
jQuery
);
\ No newline at end of file
js/bootstrap-carousel.js
View file @
e1f6458e
...
...
@@ -163,14 +163,12 @@
/* CAROUSEL DATA-API
* ================= */
$
(
function
()
{
$
(
document
).
on
(
'
click.carousel.data-api
'
,
'
[data-slide]
'
,
function
(
e
)
{
var
$this
=
$
(
this
),
href
,
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
,
options
=
!
$target
.
data
(
'
modal
'
)
&&
$
.
extend
({},
$target
.
data
(),
$this
.
data
())
$target
.
carousel
(
options
)
e
.
preventDefault
()
})
$
(
document
).
on
(
'
click.carousel.data-api
'
,
'
[data-slide]
'
,
function
(
e
)
{
var
$this
=
$
(
this
),
href
,
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
,
options
=
!
$target
.
data
(
'
modal
'
)
&&
$
.
extend
({},
$target
.
data
(),
$this
.
data
())
$target
.
carousel
(
options
)
e
.
preventDefault
()
})
}(
window
.
jQuery
);
\ No newline at end of file
js/bootstrap-collapse.js
View file @
e1f6458e
...
...
@@ -143,16 +143,14 @@
/* COLLAPSIBLE DATA-API
* ==================== */
$
(
function
()
{
$
(
document
).
on
(
'
click.collapse.data-api
'
,
'
[data-toggle=collapse]
'
,
function
(
e
)
{
var
$this
=
$
(
this
),
href
,
target
=
$this
.
attr
(
'
data-target
'
)
||
e
.
preventDefault
()
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
//strip for ie7
,
option
=
$
(
target
).
data
(
'
collapse
'
)
?
'
toggle
'
:
$this
.
data
()
$this
[
$
(
target
).
hasClass
(
'
in
'
)
?
'
addClass
'
:
'
removeClass
'
](
'
collapsed
'
)
$
(
target
).
collapse
(
option
)
})
$
(
document
).
on
(
'
click.collapse.data-api
'
,
'
[data-toggle=collapse]
'
,
function
(
e
)
{
var
$this
=
$
(
this
),
href
,
target
=
$this
.
attr
(
'
data-target
'
)
||
e
.
preventDefault
()
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)
//strip for ie7
,
option
=
$
(
target
).
data
(
'
collapse
'
)
?
'
toggle
'
:
$this
.
data
()
$this
[
$
(
target
).
hasClass
(
'
in
'
)
?
'
addClass
'
:
'
removeClass
'
](
'
collapsed
'
)
$
(
target
).
collapse
(
option
)
})
}(
window
.
jQuery
);
\ No newline at end of file
js/bootstrap-dropdown.js
View file @
e1f6458e
...
...
@@ -138,13 +138,10 @@
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
$
(
function
()
{
$
(
'
html
'
)
.
on
(
'
click.dropdown.data-api touchstart.dropdown.data-api
'
,
clearMenus
)
$
(
document
)
.
on
(
'
click.dropdown touchstart.dropdown.data-api
'
,
'
.dropdown form
'
,
function
(
e
)
{
e
.
stopPropagation
()
})
.
on
(
'
click.dropdown.data-api touchstart.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
toggle
)
.
on
(
'
keydown.dropdown.data-api touchstart.dropdown.data-api
'
,
toggle
+
'
, [role=menu]
'
,
Dropdown
.
prototype
.
keydown
)
})
$
(
document
)
.
on
(
'
click.dropdown.data-api touchstart.dropdown.data-api
'
,
clearMenus
)
.
on
(
'
click.dropdown touchstart.dropdown.data-api
'
,
'
.dropdown form
'
,
function
(
e
)
{
e
.
stopPropagation
()
})
.
on
(
'
click.dropdown.data-api touchstart.dropdown.data-api
'
,
toggle
,
Dropdown
.
prototype
.
toggle
)
.
on
(
'
keydown.dropdown.data-api touchstart.dropdown.data-api
'
,
toggle
+
'
, [role=menu]
'
,
Dropdown
.
prototype
.
keydown
)
}(
window
.
jQuery
);
\ No newline at end of file
js/bootstrap-modal.js
View file @
e1f6458e
...
...
@@ -215,21 +215,19 @@
/* MODAL DATA-API
* ============== */
$
(
function
()
{
$
(
document
).
on
(
'
click.modal.data-api
'
,
'
[data-toggle="modal"]
'
,
function
(
e
)
{
var
$this
=
$
(
this
)
,
href
=
$this
.
attr
(
'
href
'
)
,
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)))
//strip for ie7
,
option
=
$target
.
data
(
'
modal
'
)
?
'
toggle
'
:
$
.
extend
({
remote
:
!
/#/
.
test
(
href
)
&&
href
},
$target
.
data
(),
$this
.
data
())
e
.
preventDefault
()
$target
.
modal
(
option
)
.
one
(
'
hide
'
,
function
()
{
$this
.
focus
()
})
})
$
(
document
).
on
(
'
click.modal.data-api
'
,
'
[data-toggle="modal"]
'
,
function
(
e
)
{
var
$this
=
$
(
this
)
,
href
=
$this
.
attr
(
'
href
'
)
,
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)))
//strip for ie7
,
option
=
$target
.
data
(
'
modal
'
)
?
'
toggle
'
:
$
.
extend
({
remote
:
!
/#/
.
test
(
href
)
&&
href
},
$target
.
data
(),
$this
.
data
())
e
.
preventDefault
()
$target
.
modal
(
option
)
.
one
(
'
hide
'
,
function
()
{
$this
.
focus
()
})
})
}(
window
.
jQuery
);
\ No newline at end of file
js/bootstrap-tab.js
View file @
e1f6458e
...
...
@@ -125,11 +125,9 @@
/* TAB DATA-API
* ============ */
$
(
function
()
{
$
(
document
).
on
(
'
click.tab.data-api
'
,
'
[data-toggle="tab"], [data-toggle="pill"]
'
,
function
(
e
)
{
e
.
preventDefault
()
$
(
this
).
tab
(
'
show
'
)
})
$
(
document
).
on
(
'
click.tab.data-api
'
,
'
[data-toggle="tab"], [data-toggle="pill"]
'
,
function
(
e
)
{
e
.
preventDefault
()
$
(
this
).
tab
(
'
show
'
)
})
}(
window
.
jQuery
);
\ No newline at end of file
js/bootstrap-typeahead.js
View file @
e1f6458e
...
...
@@ -297,13 +297,11 @@
/* TYPEAHEAD DATA-API
* ================== */
$
(
function
()
{
$
(
document
).
on
(
'
focus.typeahead.data-api
'
,
'
[data-provide="typeahead"]
'
,
function
(
e
)
{
var
$this
=
$
(
this
)
if
(
$this
.
data
(
'
typeahead
'
))
return
e
.
preventDefault
()
$this
.
typeahead
(
$this
.
data
())
})
$
(
document
).
on
(
'
focus.typeahead.data-api
'
,
'
[data-provide="typeahead"]
'
,
function
(
e
)
{
var
$this
=
$
(
this
)
if
(
$this
.
data
(
'
typeahead
'
))
return
e
.
preventDefault
()
$this
.
typeahead
(
$this
.
data
())
})
}(
window
.
jQuery
);
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment