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
474471b8
Commit
474471b8
authored
Sep 26, 2012
by
Carl Porth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bind data-api events to document instead of body to allow body replacement
parent
24e277b8
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
8 additions
and
8 deletions
+8
-8
js/bootstrap-alert.js
js/bootstrap-alert.js
+1
-1
js/bootstrap-button.js
js/bootstrap-button.js
+1
-1
js/bootstrap-carousel.js
js/bootstrap-carousel.js
+1
-1
js/bootstrap-collapse.js
js/bootstrap-collapse.js
+1
-1
js/bootstrap-dropdown.js
js/bootstrap-dropdown.js
+1
-1
js/bootstrap-modal.js
js/bootstrap-modal.js
+1
-1
js/bootstrap-tab.js
js/bootstrap-tab.js
+1
-1
js/bootstrap-typeahead.js
js/bootstrap-typeahead.js
+1
-1
No files found.
js/bootstrap-alert.js
View file @
474471b8
...
@@ -84,7 +84,7 @@
...
@@ -84,7 +84,7 @@
* ============== */
* ============== */
$
(
function
()
{
$
(
function
()
{
$
(
'
body
'
).
on
(
'
click.alert.data-api
'
,
dismiss
,
Alert
.
prototype
.
close
)
$
(
document
).
on
(
'
click.alert.data-api
'
,
dismiss
,
Alert
.
prototype
.
close
)
})
})
}(
window
.
jQuery
);
}(
window
.
jQuery
);
\ No newline at end of file
js/bootstrap-button.js
View file @
474471b8
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
* =============== */
* =============== */
$
(
function
()
{
$
(
function
()
{
$
(
'
body
'
).
on
(
'
click.button.data-api
'
,
'
[data-toggle^=button]
'
,
function
(
e
)
{
$
(
document
).
on
(
'
click.button.data-api
'
,
'
[data-toggle^=button]
'
,
function
(
e
)
{
var
$btn
=
$
(
e
.
target
)
var
$btn
=
$
(
e
.
target
)
if
(
!
$btn
.
hasClass
(
'
btn
'
))
$btn
=
$btn
.
closest
(
'
.btn
'
)
if
(
!
$btn
.
hasClass
(
'
btn
'
))
$btn
=
$btn
.
closest
(
'
.btn
'
)
$btn
.
button
(
'
toggle
'
)
$btn
.
button
(
'
toggle
'
)
...
...
js/bootstrap-carousel.js
View file @
474471b8
...
@@ -164,7 +164,7 @@
...
@@ -164,7 +164,7 @@
* ================= */
* ================= */
$
(
function
()
{
$
(
function
()
{
$
(
'
body
'
).
on
(
'
click.carousel.data-api
'
,
'
[data-slide]
'
,
function
(
e
)
{
$
(
document
).
on
(
'
click.carousel.data-api
'
,
'
[data-slide]
'
,
function
(
e
)
{
var
$this
=
$
(
this
),
href
var
$this
=
$
(
this
),
href
,
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
,
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
=
$this
.
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
,
options
=
!
$target
.
data
(
'
modal
'
)
&&
$
.
extend
({},
$target
.
data
(),
$this
.
data
())
,
options
=
!
$target
.
data
(
'
modal
'
)
&&
$
.
extend
({},
$target
.
data
(),
$this
.
data
())
...
...
js/bootstrap-collapse.js
View file @
474471b8
...
@@ -144,7 +144,7 @@
...
@@ -144,7 +144,7 @@
* ==================== */
* ==================== */
$
(
function
()
{
$
(
function
()
{
$
(
'
body
'
).
on
(
'
click.collapse.data-api
'
,
'
[data-toggle=collapse]
'
,
function
(
e
)
{
$
(
document
).
on
(
'
click.collapse.data-api
'
,
'
[data-toggle=collapse]
'
,
function
(
e
)
{
var
$this
=
$
(
this
),
href
var
$this
=
$
(
this
),
href
,
target
=
$this
.
attr
(
'
data-target
'
)
,
target
=
$this
.
attr
(
'
data-target
'
)
||
e
.
preventDefault
()
||
e
.
preventDefault
()
...
...
js/bootstrap-dropdown.js
View file @
474471b8
...
@@ -141,7 +141,7 @@
...
@@ -141,7 +141,7 @@
$
(
function
()
{
$
(
function
()
{
$
(
'
html
'
)
$
(
'
html
'
)
.
on
(
'
click.dropdown.data-api touchstart.dropdown.data-api
'
,
clearMenus
)
.
on
(
'
click.dropdown.data-api touchstart.dropdown.data-api
'
,
clearMenus
)
$
(
'
body
'
)
$
(
document
)
.
on
(
'
click.dropdown touchstart.dropdown.data-api
'
,
'
.dropdown form
'
,
function
(
e
)
{
e
.
stopPropagation
()
})
.
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
(
'
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
)
.
on
(
'
keydown.dropdown.data-api touchstart.dropdown.data-api
'
,
toggle
+
'
, [role=menu]
'
,
Dropdown
.
prototype
.
keydown
)
...
...
js/bootstrap-modal.js
View file @
474471b8
...
@@ -216,7 +216,7 @@
...
@@ -216,7 +216,7 @@
* ============== */
* ============== */
$
(
function
()
{
$
(
function
()
{
$
(
'
body
'
).
on
(
'
click.modal.data-api
'
,
'
[data-toggle="modal"]
'
,
function
(
e
)
{
$
(
document
).
on
(
'
click.modal.data-api
'
,
'
[data-toggle="modal"]
'
,
function
(
e
)
{
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
,
href
=
$this
.
attr
(
'
href
'
)
,
href
=
$this
.
attr
(
'
href
'
)
,
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)))
//strip for ie7
,
$target
=
$
(
$this
.
attr
(
'
data-target
'
)
||
(
href
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
)))
//strip for ie7
...
...
js/bootstrap-tab.js
View file @
474471b8
...
@@ -126,7 +126,7 @@
...
@@ -126,7 +126,7 @@
* ============ */
* ============ */
$
(
function
()
{
$
(
function
()
{
$
(
'
body
'
).
on
(
'
click.tab.data-api
'
,
'
[data-toggle="tab"], [data-toggle="pill"]
'
,
function
(
e
)
{
$
(
document
).
on
(
'
click.tab.data-api
'
,
'
[data-toggle="tab"], [data-toggle="pill"]
'
,
function
(
e
)
{
e
.
preventDefault
()
e
.
preventDefault
()
$
(
this
).
tab
(
'
show
'
)
$
(
this
).
tab
(
'
show
'
)
})
})
...
...
js/bootstrap-typeahead.js
View file @
474471b8
...
@@ -298,7 +298,7 @@
...
@@ -298,7 +298,7 @@
* ================== */
* ================== */
$
(
function
()
{
$
(
function
()
{
$
(
'
body
'
).
on
(
'
focus.typeahead.data-api
'
,
'
[data-provide="typeahead"]
'
,
function
(
e
)
{
$
(
document
).
on
(
'
focus.typeahead.data-api
'
,
'
[data-provide="typeahead"]
'
,
function
(
e
)
{
var
$this
=
$
(
this
)
var
$this
=
$
(
this
)
if
(
$this
.
data
(
'
typeahead
'
))
return
if
(
$this
.
data
(
'
typeahead
'
))
return
e
.
preventDefault
()
e
.
preventDefault
()
...
...
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