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
149ecd21
Commit
149ecd21
authored
May 16, 2013
by
fat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
straight trash wang
parent
53bc9328
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
604 additions
and
648 deletions
+604
-648
js/alert.js
js/alert.js
+4
-4
js/carousel.js
js/carousel.js
+4
-3
js/collapse.js
js/collapse.js
+2
-2
js/dropdown.js
js/dropdown.js
+0
-1
js/modal.js
js/modal.js
+138
-147
js/popover.js
js/popover.js
+49
-54
js/scrollspy.js
js/scrollspy.js
+94
-100
js/tab.js
js/tab.js
+64
-75
js/tooltip.js
js/tooltip.js
+237
-247
js/transition.js
js/transition.js
+12
-15
No files found.
js/alert.js
View file @
149ecd21
...
...
@@ -45,7 +45,7 @@
$parent
=
$this
.
hasClass
(
'
alert
'
)
?
$this
:
$this
.
parent
()
}
$parent
.
trigger
(
e
=
$
.
Event
(
'
bs
-
close
'
))
$parent
.
trigger
(
e
=
$
.
Event
(
'
bs
:alert:
close
'
))
if
(
e
.
isDefaultPrevented
())
return
...
...
@@ -79,8 +79,8 @@
$
.
fn
.
alert
.
Constructor
=
Alert
/*
ALERT NO CONFLICT
* ================= */
//
ALERT NO CONFLICT
// =================
$
.
fn
.
alert
.
noConflict
=
function
()
{
$
.
fn
.
alert
=
old
...
...
@@ -89,7 +89,7 @@
// ALERT DATA-API
// ==============
*/
// ==============
$
(
document
).
on
(
'
click.bs-alert.bs-data-api
'
,
dismiss
,
Alert
.
prototype
.
close
)
...
...
js/carousel.js
View file @
149ecd21
...
...
@@ -111,7 +111,7 @@
$next
=
$next
.
length
?
$next
:
this
.
$element
.
find
(
'
.item
'
)[
fallback
]()
var
e
=
$
.
Event
(
'
slide
'
,
{
relatedTarget
:
$next
[
0
],
direction
:
direction
})
var
e
=
$
.
Event
(
'
bs:carousel:
slide
'
,
{
relatedTarget
:
$next
[
0
],
direction
:
direction
})
if
(
$next
.
hasClass
(
'
active
'
))
return
...
...
@@ -159,11 +159,11 @@
$
.
fn
.
carousel
=
function
(
option
)
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
var
data
=
$this
.
data
(
'
carousel
'
)
var
data
=
$this
.
data
(
'
bs-
carousel
'
)
var
options
=
$
.
extend
({},
Carousel
.
DEFAULTS
,
typeof
option
==
'
object
'
&&
option
)
var
action
=
typeof
option
==
'
string
'
?
option
:
options
.
slide
if
(
!
data
)
$this
.
data
(
'
carousel
'
,
(
data
=
new
Carousel
(
this
,
options
)))
if
(
!
data
)
$this
.
data
(
'
bs-
carousel
'
,
(
data
=
new
Carousel
(
this
,
options
)))
if
(
typeof
option
==
'
number
'
)
data
.
to
(
option
)
else
if
(
action
)
data
[
action
]()
else
if
(
options
.
interval
)
data
.
pause
().
cycle
()
...
...
@@ -181,6 +181,7 @@
return
this
}
// CAROUSEL DATA-API
// =================
...
...
js/collapse.js
View file @
149ecd21
...
...
@@ -56,7 +56,7 @@
}
this
.
$element
[
dimension
](
0
)
this
.
transition
(
'
addClass
'
,
$
.
Event
(
'
show
'
),
'
shown
'
)
this
.
transition
(
'
addClass
'
,
$
.
Event
(
'
bs:collapse:
show
'
),
'
shown
'
)
if
(
$
.
support
.
transition
)
this
.
$element
[
dimension
](
this
.
$element
[
0
][
scroll
])
}
...
...
@@ -65,7 +65,7 @@
if
(
this
.
transitioning
||
!
this
.
$element
.
hasClass
(
'
in
'
))
return
var
dimension
=
this
.
dimension
()
this
.
reset
(
this
.
$element
[
dimension
]())
this
.
transition
(
'
removeClass
'
,
$
.
Event
(
'
hide
'
),
'
hidden
'
)
this
.
transition
(
'
removeClass
'
,
$
.
Event
(
'
bs:collapse:
hide
'
),
'
hidden
'
)
this
.
$element
[
dimension
](
0
)
}
...
...
js/dropdown.js
View file @
149ecd21
...
...
@@ -20,7 +20,6 @@
!
function
(
$
)
{
"
use strict
"
;
// DROPDOWN CLASS DEFINITION
// =========================
...
...
js/modal.js
View file @
149ecd21
This diff is collapsed.
Click to expand it.
js/popover.js
View file @
149ecd21
...
...
@@ -18,93 +18,88 @@
* =========================================================== */
!
function
(
$
)
{
!
function
(
$
)
{
"
use strict
"
;
"
use strict
"
;
// jshint ;_;
/* POPOVER PUBLIC CLASS DEFINITION
* =============================== */
// POPOVER PUBLIC CLASS DEFINITION
// ===============================
var
Popover
=
function
(
element
,
options
)
{
this
.
init
(
'
popover
'
,
element
,
options
)
}
Popover
.
DEFAULTS
=
$
.
extend
({}
,
$
.
fn
.
tooltip
.
Constructor
.
DEFAULTS
,
{
placement
:
'
right
'
,
trigger
:
'
click
'
,
content
:
''
,
template
:
'
<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>
'
})
/* NOTE: POPOVER EXTENDS tooltip.js
========================================== */
Popover
.
prototype
=
$
.
extend
({},
$
.
fn
.
tooltip
.
Constructor
.
prototype
,
{
// NOTE: POPOVER EXTENDS tooltip.js
// ================================
constructor
:
Popover
Popover
.
prototype
=
$
.
extend
({},
$
.
fn
.
tooltip
.
Constructor
.
prototype
)
,
setContent
:
function
()
{
var
$tip
=
this
.
tip
()
,
title
=
this
.
getTitle
()
,
content
=
this
.
getContent
()
Popover
.
prototype
.
constructor
=
Popover
$tip
.
find
(
'
.popover-title
'
)[
this
.
options
.
html
?
'
html
'
:
'
text
'
](
title
)
$tip
.
find
(
'
.popover-content
'
)[
this
.
options
.
html
?
'
html
'
:
'
text
'
](
content
)
Popover
.
prototype
.
getDefaults
=
function
()
{
return
Popover
.
DEFAULTS
}
$tip
.
removeClass
(
'
fade top bottom left right in
'
)
}
Popover
.
prototype
.
setContent
=
function
()
{
var
$tip
=
this
.
tip
()
var
title
=
this
.
getTitle
()
var
content
=
this
.
getContent
()
,
hasContent
:
function
()
{
return
this
.
getTitle
()
||
this
.
getContent
()
}
$tip
.
find
(
'
.popover-title
'
)[
this
.
options
.
html
?
'
html
'
:
'
text
'
](
title
)
$tip
.
find
(
'
.popover-content
'
)[
this
.
options
.
html
?
'
html
'
:
'
text
'
](
content
)
,
getContent
:
function
()
{
var
content
,
$e
=
this
.
$element
,
o
=
this
.
options
$tip
.
removeClass
(
'
fade top bottom left right in
'
)
}
content
=
(
typeof
o
.
content
==
'
function
'
?
o
.
content
.
call
(
$e
[
0
])
:
o
.
content
)
||
$e
.
attr
(
'
data-content
'
)
Popover
.
prototype
.
hasContent
=
function
()
{
return
this
.
getTitle
()
||
this
.
getContent
()
}
return
content
}
Popover
.
prototype
.
getContent
=
function
()
{
var
content
=
typeof
this
.
options
.
content
==
'
function
'
?
this
.
options
.
content
.
call
(
$e
[
0
])
:
this
.
options
.
content
,
tip
:
function
()
{
if
(
!
this
.
$tip
)
{
this
.
$tip
=
$
(
this
.
options
.
template
)
}
return
this
.
$tip
}
return
content
||
this
.
$element
.
attr
(
'
data-content
'
)
}
,
destroy
:
function
()
{
this
.
hide
().
$element
.
off
(
'
.
'
+
this
.
type
).
removeData
(
this
.
type
)
}
Popover
.
prototype
.
tip
=
function
()
{
if
(
!
this
.
$tip
)
this
.
$tip
=
$
(
this
.
options
.
template
)
return
this
.
$tip
}
})
Popover
.
prototype
.
destroy
=
function
()
{
this
.
hide
().
$element
.
off
(
'
.
'
+
this
.
type
).
removeData
(
this
.
type
)
}
/*
POPOVER PLUGIN DEFINITION
* ======================= */
//
POPOVER PLUGIN DEFINITION
// =========================
var
old
=
$
.
fn
.
popover
$
.
fn
.
popover
=
function
(
option
)
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
,
data
=
$this
.
data
(
'
popover
'
)
,
options
=
typeof
option
==
'
object
'
&&
option
if
(
!
data
)
$this
.
data
(
'
popover
'
,
(
data
=
new
Popover
(
this
,
options
)))
var
$this
=
$
(
this
)
var
data
=
$this
.
data
(
'
bs-popover
'
)
var
options
=
typeof
option
==
'
object
'
&&
option
if
(
!
data
)
$this
.
data
(
'
bs-popover
'
,
(
data
=
new
Popover
(
this
,
options
)))
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
})
}
$
.
fn
.
popover
.
Constructor
=
Popover
$
.
fn
.
popover
.
defaults
=
$
.
extend
({}
,
$
.
fn
.
tooltip
.
defaults
,
{
placement
:
'
right
'
,
trigger
:
'
click
'
,
content
:
''
,
template
:
'
<div class="popover"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>
'
})
/*
POPOVER NO CONFLICT
* =================== */
//
POPOVER NO CONFLICT
// ===================
$
.
fn
.
popover
.
noConflict
=
function
()
{
$
.
fn
.
popover
=
old
...
...
js/scrollspy.js
View file @
149ecd21
...
...
@@ -18,130 +18,124 @@
* ============================================================== */
!
function
(
$
)
{
!
function
(
$
)
{
"
use strict
"
;
"
use strict
"
;
// jshint ;_;
/* SCROLLSPY CLASS DEFINITION
* ========================== */
// SCROLLSPY CLASS DEFINITION
// ==========================
function
ScrollSpy
(
element
,
options
)
{
var
process
=
$
.
proxy
(
this
.
process
,
this
)
,
$element
=
$
(
element
).
is
(
'
body
'
)
?
$
(
window
)
:
$
(
element
)
,
href
this
.
options
=
$
.
extend
({},
$
.
fn
.
scrollspy
.
defaults
,
options
)
var
href
var
process
=
$
.
proxy
(
this
.
process
,
this
)
var
$element
=
$
(
element
).
is
(
'
body
'
)
?
$
(
window
)
:
$
(
element
)
this
.
$body
=
$
(
'
body
'
)
this
.
$scrollElement
=
$element
.
on
(
'
scroll.scroll-spy.data-api
'
,
process
)
this
.
selector
=
(
this
.
options
.
target
this
.
options
=
$
.
extend
({},
ScrollSpy
.
DEFAULTS
,
options
)
this
.
selector
=
(
this
.
options
.
target
||
((
href
=
$
(
element
).
attr
(
'
href
'
))
&&
href
.
replace
(
/.*
(?=
#
[^\s]
+$
)
/
,
''
))
//strip for ie7
||
''
)
+
'
.nav li > a
'
this
.
$body
=
$
(
'
body
'
)
this
.
offsets
=
$
([])
this
.
targets
=
$
([])
this
.
activeTarget
=
null
this
.
refresh
()
this
.
process
()
}
ScrollSpy
.
prototype
=
{
constructor
:
ScrollSpy
,
refresh
:
function
()
{
var
self
=
this
,
$targets
this
.
offsets
=
$
([])
this
.
targets
=
$
([])
$targets
=
this
.
$body
.
find
(
this
.
selector
)
.
map
(
function
()
{
var
$el
=
$
(
this
)
,
href
=
$el
.
data
(
'
target
'
)
||
$el
.
attr
(
'
href
'
)
,
$href
=
/^#
\w
/
.
test
(
href
)
&&
$
(
href
)
return
(
$href
&&
$href
.
length
&&
[[
$href
.
position
().
top
+
(
!
$
.
isWindow
(
self
.
$scrollElement
.
get
(
0
))
&&
self
.
$scrollElement
.
scrollTop
()),
href
]]
)
||
null
})
.
sort
(
function
(
a
,
b
)
{
return
a
[
0
]
-
b
[
0
]
})
.
each
(
function
()
{
self
.
offsets
.
push
(
this
[
0
])
self
.
targets
.
push
(
this
[
1
])
})
}
,
process
:
function
()
{
var
scrollTop
=
this
.
$scrollElement
.
scrollTop
()
+
this
.
options
.
offset
,
scrollHeight
=
this
.
$scrollElement
[
0
].
scrollHeight
||
this
.
$body
[
0
].
scrollHeight
,
maxScroll
=
scrollHeight
-
this
.
$scrollElement
.
height
()
,
offsets
=
this
.
offsets
,
targets
=
this
.
targets
,
activeTarget
=
this
.
activeTarget
,
i
if
(
scrollTop
>=
maxScroll
)
{
return
activeTarget
!=
(
i
=
targets
.
last
()[
0
])
&&
this
.
activate
(
i
)
}
for
(
i
=
offsets
.
length
;
i
--
;)
{
activeTarget
!=
targets
[
i
]
&&
scrollTop
>=
offsets
[
i
]
&&
(
!
offsets
[
i
+
1
]
||
scrollTop
<=
offsets
[
i
+
1
])
&&
this
.
activate
(
targets
[
i
]
)
}
}
,
activate
:
function
(
target
)
{
var
active
,
selector
this
.
activeTarget
=
target
$
(
this
.
selector
)
.
parents
(
'
.active
'
)
.
removeClass
(
'
active
'
)
selector
=
this
.
selector
+
'
[data-target="
'
+
target
+
'
"],
'
+
this
.
selector
+
'
[href="
'
+
target
+
'
"]
'
active
=
$
(
selector
)
.
parents
(
'
li
'
)
.
addClass
(
'
active
'
)
if
(
active
.
parent
(
'
.dropdown-menu
'
).
length
)
{
active
=
active
.
closest
(
'
li.dropdown
'
).
addClass
(
'
active
'
)
}
active
.
trigger
(
'
activate
'
)
}
ScrollSpy
.
DEFAULTS
=
{
offset
:
10
}
ScrollSpy
.
prototype
.
refresh
=
function
()
{
this
.
offsets
=
$
([])
this
.
targets
=
$
([])
var
self
=
this
var
$targets
=
this
.
$body
.
find
(
this
.
selector
)
.
map
(
function
()
{
var
$el
=
$
(
this
)
var
href
=
$el
.
data
(
'
target
'
)
||
$el
.
attr
(
'
href
'
)
var
$href
=
/^#
\w
/
.
test
(
href
)
&&
$
(
href
)
return
(
$href
&&
$href
.
length
&&
[[
$href
.
position
().
top
+
(
!
$
.
isWindow
(
self
.
$scrollElement
.
get
(
0
))
&&
self
.
$scrollElement
.
scrollTop
()),
href
]])
||
null
})
.
sort
(
function
(
a
,
b
)
{
return
a
[
0
]
-
b
[
0
]
})
.
each
(
function
()
{
self
.
offsets
.
push
(
this
[
0
])
self
.
targets
.
push
(
this
[
1
])
})
}
ScrollSpy
.
prototype
.
process
=
function
()
{
var
scrollTop
=
this
.
$scrollElement
.
scrollTop
()
+
this
.
options
.
offset
var
scrollHeight
=
this
.
$scrollElement
[
0
].
scrollHeight
||
this
.
$body
[
0
].
scrollHeight
var
maxScroll
=
scrollHeight
-
this
.
$scrollElement
.
height
()
var
offsets
=
this
.
offsets
var
targets
=
this
.
targets
var
activeTarget
=
this
.
activeTarget
var
i
if
(
scrollTop
>=
maxScroll
)
{
return
activeTarget
!=
(
i
=
targets
.
last
()[
0
])
&&
this
.
activate
(
i
)
}
for
(
i
=
offsets
.
length
;
i
--
;)
{
activeTarget
!=
targets
[
i
]
&&
scrollTop
>=
offsets
[
i
]
&&
(
!
offsets
[
i
+
1
]
||
scrollTop
<=
offsets
[
i
+
1
])
&&
this
.
activate
(
targets
[
i
]
)
}
}
ScrollSpy
.
prototype
.
activate
=
function
(
target
)
{
this
.
activeTarget
=
target
$
(
this
.
selector
)
.
parents
(
'
.active
'
)
.
removeClass
(
'
active
'
)
var
selector
=
this
.
selector
+
'
[data-target="
'
+
target
+
'
"],
'
+
this
.
selector
+
'
[href="
'
+
target
+
'
"]
'
/* SCROLLSPY PLUGIN DEFINITION
* =========================== */
var
active
=
$
(
selector
)
.
parents
(
'
li
'
)
.
addClass
(
'
active
'
)
if
(
active
.
parent
(
'
.dropdown-menu
'
).
length
)
{
active
=
active
.
closest
(
'
li.dropdown
'
)
.
addClass
(
'
active
'
)
}
active
.
trigger
(
'
activate
'
)
}
// SCROLLSPY PLUGIN DEFINITION
// ===========================
var
old
=
$
.
fn
.
scrollspy
$
.
fn
.
scrollspy
=
function
(
option
)
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
,
data
=
$this
.
data
(
'
scrollspy
'
)
,
options
=
typeof
option
==
'
object
'
&&
option
if
(
!
data
)
$this
.
data
(
'
scrollspy
'
,
(
data
=
new
ScrollSpy
(
this
,
options
)))
var
$this
=
$
(
this
)
var
data
=
$this
.
data
(
'
bs-scrollspy
'
)
var
options
=
typeof
option
==
'
object
'
&&
option
if
(
!
data
)
$this
.
data
(
'
bs-scrollspy
'
,
(
data
=
new
ScrollSpy
(
this
,
options
)))
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
})
}
$
.
fn
.
scrollspy
.
Constructor
=
ScrollSpy
$
.
fn
.
scrollspy
.
defaults
=
{
offset
:
10
}
/*
SCROLLSPY NO CONFLICT
* ===================== */
//
SCROLLSPY NO CONFLICT
// =====================
$
.
fn
.
scrollspy
.
noConflict
=
function
()
{
$
.
fn
.
scrollspy
=
old
...
...
@@ -149,8 +143,8 @@
}
/*
SCROLLSPY DATA-API
* ================== */
//
SCROLLSPY DATA-API
// ==================
$
(
window
).
on
(
'
load
'
,
function
()
{
$
(
'
[data-spy="scroll"]
'
).
each
(
function
()
{
...
...
js/tab.js
View file @
149ecd21
...
...
@@ -18,105 +18,94 @@
* ======================================================== */
!
function
(
$
)
{
!
function
(
$
)
{
"
use strict
"
;
"
use strict
"
;
// jshint ;_;
/* TAB CLASS DEFINITION
* ==================== */
// TAB CLASS DEFINITION
// ====================
var
Tab
=
function
(
element
)
{
this
.
element
=
$
(
element
)
}
Tab
.
prototype
=
{
constructor
:
Tab
,
show
:
function
()
{
var
$this
=
this
.
element
,
$ul
=
$this
.
closest
(
'
ul:not(.dropdown-menu)
'
)
,
selector
=
$this
.
attr
(
'
data-target
'
)
,
previous
,
$target
,
e
if
(
!
selector
)
{
selector
=
$this
.
attr
(
'
href
'
)
selector
=
selector
&&
selector
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
''
)
//strip for ie7
}
Tab
.
prototype
.
show
=
function
()
{
var
$this
=
this
.
element
var
$ul
=
$this
.
closest
(
'
ul:not(.dropdown-menu)
'
)
var
selector
=
$this
.
attr
(
'
data-target
'
)
if
(
$this
.
parent
(
'
li
'
).
hasClass
(
'
active
'
)
)
return
if
(
!
selector
)
{
selector
=
$this
.
attr
(
'
href
'
)
selector
=
selector
&&
selector
.
replace
(
/.*
(?=
#
[^\s]
*$
)
/
,
''
)
//strip for ie7
}
previous
=
$ul
.
find
(
'
.active:last a
'
)[
0
]
if
(
$this
.
parent
(
'
li
'
).
hasClass
(
'
active
'
))
return
e
=
$
.
Event
(
'
show
'
,
{
relatedTarget
:
previous
})
var
previous
=
$ul
.
find
(
'
.active:last a
'
)[
0
]
var
e
=
$
.
Event
(
'
bs:tab:show
'
,
{
relatedTarget
:
previous
})
$this
.
trigger
(
e
)
$this
.
trigger
(
e
)
if
(
e
.
isDefaultPrevented
())
return
if
(
e
.
isDefaultPrevented
())
return
$target
=
$
(
selector
)
var
$target
=
$
(
selector
)
this
.
activate
(
$this
.
parent
(
'
li
'
),
$ul
)
this
.
activate
(
$target
,
$target
.
parent
(),
function
()
{
$this
.
trigger
({
type
:
'
shown
'
,
relatedTarget
:
previous
})
this
.
activate
(
$this
.
parent
(
'
li
'
),
$ul
)
this
.
activate
(
$target
,
$target
.
parent
(),
function
()
{
$this
.
trigger
({
type
:
'
bs:tab:shown
'
,
relatedTarget
:
previous
})
}
,
activate
:
function
(
element
,
container
,
callback
)
{
var
$active
=
container
.
find
(
'
> .active
'
)
,
transition
=
callback
&&
$
.
support
.
transition
&&
$active
.
hasClass
(
'
fade
'
)
function
next
()
{
$active
.
removeClass
(
'
active
'
)
.
find
(
'
> .dropdown-menu > .active
'
)
.
removeClass
(
'
active
'
)
element
.
addClass
(
'
active
'
)
if
(
transition
)
{
element
[
0
].
offsetWidth
// reflow for transition
element
.
addClass
(
'
in
'
)
}
else
{
element
.
removeClass
(
'
fade
'
)
}
if
(
element
.
parent
(
'
.dropdown-menu
'
)
)
{
element
.
closest
(
'
li.dropdown
'
).
addClass
(
'
active
'
)
}
})
}
callback
&&
callback
()
Tab
.
prototype
.
activate
=
function
(
element
,
container
,
callback
)
{
var
$active
=
container
.
find
(
'
> .active
'
)
var
transition
=
callback
&&
$
.
support
.
transition
&&
$active
.
hasClass
(
'
fade
'
)
function
next
()
{
$active
.
removeClass
(
'
active
'
)
.
find
(
'
> .dropdown-menu > .active
'
)
.
removeClass
(
'
active
'
)
element
.
addClass
(
'
active
'
)
if
(
transition
)
{
element
[
0
].
offsetWidth
// reflow for transition
element
.
addClass
(
'
in
'
)
}
else
{
element
.
removeClass
(
'
fade
'
)
}
transition
?
$active
.
one
(
$
.
support
.
transition
.
end
,
next
)
:
next
()
if
(
element
.
parent
(
'
.dropdown-menu
'
))
{
element
.
closest
(
'
li.dropdown
'
).
addClass
(
'
active
'
)
}
$active
.
removeClass
(
'
in
'
)
callback
&&
callback
(
)
}
transition
?
$active
.
one
(
$
.
support
.
transition
.
end
,
next
)
:
next
()
$active
.
removeClass
(
'
in
'
)
}
/*
TAB PLUGIN DEFINITION
* ===================== */
//
TAB PLUGIN DEFINITION
// =====================
var
old
=
$
.
fn
.
tab
$
.
fn
.
tab
=
function
(
option
)
{
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
,
data
=
$this
.
data
(
'
tab
'
)
if
(
!
data
)
$this
.
data
(
'
tab
'
,
(
data
=
new
Tab
(
this
)))
var
data
=
$this
.
data
(
'
bs-tab
'
)
if
(
!
data
)
$this
.
data
(
'
bs-tab
'
,
(
data
=
new
Tab
(
this
)))
if
(
typeof
option
==
'
string
'
)
data
[
option
]()
})
}
...
...
@@ -124,8 +113,8 @@
$
.
fn
.
tab
.
Constructor
=
Tab
/*
TAB NO CONFLICT
* =============== */
//
TAB NO CONFLICT
// ===============
$
.
fn
.
tab
.
noConflict
=
function
()
{
$
.
fn
.
tab
=
old
...
...
@@ -133,8 +122,8 @@
}
/*
TAB DATA-API
* ============ */
//
TAB DATA-API
// ============
$
(
document
).
on
(
'
click.tab.data-api
'
,
'
[data-toggle="tab"], [data-toggle="pill"]
'
,
function
(
e
)
{
e
.
preventDefault
()
...
...
js/tooltip.js
View file @
149ecd21
This diff is collapsed.
Click to expand it.
js/transition.js
View file @
149ecd21
...
...
@@ -18,33 +18,30 @@
* ========================================================== */
!
function
(
$
)
{
!
function
(
$
)
{
"
use strict
"
;
"
use strict
"
;
/* CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
* ======================================================= */
// CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/)
// ============================================================
function
transitionEnd
()
{
var
el
=
document
.
createElement
(
'
bootstrap
'
)
;
var
el
=
document
.
createElement
(
'
bootstrap
'
)
var
transEndEventNames
=
{
'
WebkitTransition
'
:
'
webkitTransitionEnd
'
,
'
MozTransition
'
:
'
transitionend
'
,
'
OTransition
'
:
'
oTransitionEnd otransitionend
'
,
'
transition
'
:
'
transitionend
'
}
;
'
WebkitTransition
'
:
'
webkitTransitionEnd
'
,
'
MozTransition
'
:
'
transitionend
'
,
'
OTransition
'
:
'
oTransitionEnd otransitionend
'
,
'
transition
'
:
'
transitionend
'
}
for
(
var
name
in
transEndEventNames
)
{
if
(
el
.
style
[
name
]
!==
undefined
)
{
return
{
end
:
transEndEventNames
[
name
]
}
;
return
{
end
:
transEndEventNames
[
name
]
}
}
}
}
$
(
function
()
{
$
.
support
.
transition
=
transitionEnd
()
;
})
;
$
.
support
.
transition
=
transitionEnd
()
})
}(
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