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
0b1d5d91
Commit
0b1d5d91
authored
Nov 20, 2011
by
Jacob Thornton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
revert all js stuff back to 1.4 :/
parent
4e6275d0
Changes
9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
543 additions
and
304 deletions
+543
-304
bootstrap.css
bootstrap.css
+115
-132
bootstrap.min.css
bootstrap.min.css
+75
-77
js/bootstrap-alerts.js
js/bootstrap-alerts.js
+90
-14
js/bootstrap-buttons.js
js/bootstrap-buttons.js
+62
-0
js/bootstrap-dropdown.js
js/bootstrap-dropdown.js
+25
-12
js/bootstrap-modal.js
js/bootstrap-modal.js
+86
-45
js/bootstrap-popover.js
js/bootstrap-popover.js
+19
-5
js/bootstrap-tabs.js
js/bootstrap-tabs.js
+12
-3
js/bootstrap-twipsy.js
js/bootstrap-twipsy.js
+59
-16
No files found.
bootstrap.css
View file @
0b1d5d91
This diff is collapsed.
Click to expand it.
bootstrap.min.css
View file @
0b1d5d91
This diff is collapsed.
Click to expand it.
js/bootstrap-alerts.js
View file @
0b1d5d91
/* ==========================================================
* bootstrap-alerts.js v
2.0
.0
* bootstrap-alerts.js v
1.4
.0
* http://twitter.github.com/bootstrap/javascript.html#alerts
* ==========================================================
* Copyright 2011 Twitter, Inc.
...
...
@@ -17,13 +17,56 @@
* limitations under the License.
* ========================================================== */
(
function
(
$
){
!
function
(
$
){
"
use strict
"
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */
var
transitionEnd
$
(
document
).
ready
(
function
()
{
$
.
support
.
transition
=
(
function
()
{
var
thisBody
=
document
.
body
||
document
.
documentElement
,
thisStyle
=
thisBody
.
style
,
support
=
thisStyle
.
transition
!==
undefined
||
thisStyle
.
WebkitTransition
!==
undefined
||
thisStyle
.
MozTransition
!==
undefined
||
thisStyle
.
MsTransition
!==
undefined
||
thisStyle
.
OTransition
!==
undefined
return
support
})()
// set CSS transition event type
if
(
$
.
support
.
transition
)
{
transitionEnd
=
"
TransitionEnd
"
if
(
$
.
browser
.
webkit
)
{
transitionEnd
=
"
webkitTransitionEnd
"
}
else
if
(
$
.
browser
.
mozilla
)
{
transitionEnd
=
"
transitionend
"
}
else
if
(
$
.
browser
.
opera
)
{
transitionEnd
=
"
oTransitionEnd
"
}
}
})
/* ALERT CLASS DEFINITION
* ====================== */
function
close
(
e
)
{
var
$element
=
$
(
this
).
parent
(
'
.alert-message
'
)
var
Alert
=
function
(
content
,
options
)
{
if
(
options
==
'
close
'
)
return
this
.
close
.
call
(
content
)
this
.
settings
=
$
.
extend
({},
$
.
fn
.
alert
.
defaults
,
options
)
this
.
$element
=
$
(
content
)
.
delegate
(
this
.
settings
.
selector
,
'
click
'
,
this
.
close
)
}
Alert
.
prototype
=
{
close
:
function
(
e
)
{
var
$element
=
$
(
this
)
,
className
=
'
alert-message
'
$element
=
$element
.
hasClass
(
className
)
?
$element
:
$element
.
parent
()
e
&&
e
.
preventDefault
()
$element
.
removeClass
(
'
in
'
)
...
...
@@ -33,16 +76,49 @@
}
$
.
support
.
transition
&&
$element
.
hasClass
(
'
fade
'
)
?
$element
.
bind
(
$
.
support
.
transition
.
e
nd
,
removeElement
)
:
$element
.
bind
(
transitionE
nd
,
removeElement
)
:
removeElement
()
}
}
/* ALERT PLUGIN DEFINITION
* ======================= */
$
(
function
()
{
$
(
'
body
'
).
delegate
(
'
[data-alert-dismiss]
'
,
'
click
'
,
close
)
$
.
fn
.
alert
=
function
(
options
)
{
if
(
options
===
true
)
{
return
this
.
data
(
'
alert
'
)
}
return
this
.
each
(
function
()
{
var
$this
=
$
(
this
)
,
data
if
(
typeof
options
==
'
string
'
)
{
data
=
$this
.
data
(
'
alert
'
)
if
(
typeof
data
==
'
object
'
)
{
return
data
[
options
].
call
(
$this
)
}
}
$
(
this
).
data
(
'
alert
'
,
new
Alert
(
this
,
options
))
})
}
$
.
fn
.
alert
.
defaults
=
{
selector
:
'
.close
'
}
$
(
document
).
ready
(
function
()
{
new
Alert
(
$
(
'
body
'
),
{
selector
:
'
.alert-message[data-alert] .close
'
})
})
})(
window
.
jQuery
||
window
.
ender
)
\ No newline at end of file
}(
window
.
jQuery
||
window
.
ender
);
\ No newline at end of file
js/bootstrap-buttons.js
0 → 100644
View file @
0b1d5d91
/* ============================================================
* bootstrap-buttons.js v1.4.0
* http://twitter.github.com/bootstrap/javascript.html#buttons
* ============================================================
* Copyright 2011 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ============================================================ */
!
function
(
$
){
"
use strict
"
function
setState
(
el
,
state
)
{
var
d
=
'
disabled
'
,
$el
=
$
(
el
)
,
data
=
$el
.
data
()
state
=
state
+
'
Text
'
data
.
resetText
||
$el
.
data
(
'
resetText
'
,
$el
.
html
())
$el
.
html
(
data
[
state
]
||
$
.
fn
.
button
.
defaults
[
state
]
)
state
==
'
loadingText
'
?
$el
.
addClass
(
d
).
attr
(
d
,
d
)
:
$el
.
removeClass
(
d
).
removeAttr
(
d
)
}
function
toggle
(
el
)
{
$
(
el
).
toggleClass
(
'
active
'
)
}
$
.
fn
.
button
=
function
(
options
)
{
return
this
.
each
(
function
()
{
if
(
options
==
'
toggle
'
)
{
return
toggle
(
this
)
}
options
&&
setState
(
this
,
options
)
})
}
$
.
fn
.
button
.
defaults
=
{
loadingText
:
'
loading...
'
}
$
(
function
()
{
$
(
'
body
'
).
delegate
(
'
.btn[data-toggle]
'
,
'
click
'
,
function
()
{
$
(
this
).
button
(
'
toggle
'
)
})
})
}(
window
.
jQuery
||
window
.
ender
);
\ No newline at end of file
js/bootstrap-dropdown.js
View file @
0b1d5d91
/* ============================================================
* bootstrap-dropdown.js v
2.0
.0
* bootstrap-dropdown.js v
1.4
.0
* http://twitter.github.com/bootstrap/javascript.html#dropdown
* ============================================================
* Copyright 2011 Twitter, Inc.
...
...
@@ -18,25 +18,38 @@
* ============================================================ */
(
function
(
$
){
!
function
(
$
){
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
var
selector
=
'
[data-dropdown]
'
"
use strict
"
function
clearMenus
()
{
$
(
selector
).
parent
(
'
li
'
).
removeClass
(
'
open
'
)
}
/* DROPDOWN PLUGIN DEFINITION
* ========================== */
$
(
function
(
)
{
$
(
'
html
'
).
bind
(
"
click
"
,
clearMenus
)
$
(
'
body
'
).
delegate
(
selector
,
'
click
'
,
function
(
e
)
{
$
.
fn
.
dropdown
=
function
(
selector
)
{
return
this
.
each
(
function
()
{
$
(
this
).
delegate
(
selector
||
d
,
'
click
'
,
function
(
e
)
{
var
li
=
$
(
this
).
parent
(
'
li
'
)
,
isActive
=
li
.
hasClass
(
'
open
'
)
clearMenus
()
!
isActive
&&
li
.
toggleClass
(
'
open
'
)
return
false
})
})
}
/* APPLY TO STANDARD DROPDOWN ELEMENTS
* =================================== */
var
d
=
'
a.menu, .dropdown-toggle
'
function
clearMenus
()
{
$
(
d
).
parent
(
'
li
'
).
removeClass
(
'
open
'
)
}
$
(
function
()
{
$
(
'
html
'
).
bind
(
"
click
"
,
clearMenus
)
$
(
'
body
'
).
dropdown
(
'
[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle
'
)
})
})(
window
.
jQuery
||
window
.
ender
)
\ No newline at end of file
}(
window
.
jQuery
||
window
.
ender
);
\ No newline at end of file
js/bootstrap-modal.js
View file @
0b1d5d91
/* =========================================================
* bootstrap-modal.js v
2.0
.0
* bootstrap-modal.js v
1.4
.0
* http://twitter.github.com/bootstrap/javascript.html#modal
* =========================================================
* Copyright 2011 Twitter, Inc.
...
...
@@ -20,13 +20,44 @@
!
function
(
$
){
"
use strict
"
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */
var
transitionEnd
$
(
document
).
ready
(
function
()
{
$
.
support
.
transition
=
(
function
()
{
var
thisBody
=
document
.
body
||
document
.
documentElement
,
thisStyle
=
thisBody
.
style
,
support
=
thisStyle
.
transition
!==
undefined
||
thisStyle
.
WebkitTransition
!==
undefined
||
thisStyle
.
MozTransition
!==
undefined
||
thisStyle
.
MsTransition
!==
undefined
||
thisStyle
.
OTransition
!==
undefined
return
support
})()
// set CSS transition event type
if
(
$
.
support
.
transition
)
{
transitionEnd
=
"
TransitionEnd
"
if
(
$
.
browser
.
webkit
)
{
transitionEnd
=
"
webkitTransitionEnd
"
}
else
if
(
$
.
browser
.
mozilla
)
{
transitionEnd
=
"
transitionend
"
}
else
if
(
$
.
browser
.
opera
)
{
transitionEnd
=
"
oTransitionEnd
"
}
}
})
/* MODAL PUBLIC CLASS DEFINITION
* ============================= */
var
Modal
=
function
(
content
,
options
)
{
this
.
settings
=
$
.
extend
({},
$
.
fn
.
modal
.
defaults
,
options
)
this
.
$element
=
$
(
content
)
.
delegate
(
'
[data-modal-dismiss]
'
,
'
click
'
,
$
.
proxy
(
this
.
hide
,
this
))
.
delegate
(
'
.close
'
,
'
click.modal
'
,
$
.
proxy
(
this
.
hide
,
this
))
if
(
this
.
settings
.
show
)
{
this
.
show
()
...
...
@@ -47,7 +78,24 @@
this
.
$element
.
trigger
(
'
show
'
)
escape
.
call
(
this
)
backdrop
.
call
(
this
)
backdrop
.
call
(
this
,
function
()
{
var
transition
=
$
.
support
.
transition
&&
that
.
$element
.
hasClass
(
'
fade
'
)
that
.
$element
.
appendTo
(
document
.
body
)
.
show
()
if
(
transition
)
{
that
.
$element
[
0
].
offsetWidth
// force reflow
}
that
.
$element
.
addClass
(
'
in
'
)
transition
?
that
.
$element
.
one
(
transitionEnd
,
function
()
{
that
.
$element
.
trigger
(
'
shown
'
)
})
:
that
.
$element
.
trigger
(
'
shown
'
)
})
return
this
}
...
...
@@ -68,17 +116,9 @@
.
trigger
(
'
hide
'
)
.
removeClass
(
'
in
'
)
function
removeElement
()
{
that
.
$element
.
hide
()
.
trigger
(
'
hidden
'
)
backdrop
.
call
(
that
)
}
$
.
support
.
transition
&&
this
.
$element
.
hasClass
(
'
fade
'
)
?
this
.
$element
.
one
(
$
.
support
.
transition
.
end
,
removeElement
)
:
removeElement
(
)
hideWithTransition
.
call
(
this
)
:
hideModal
.
call
(
this
)
return
this
}
...
...
@@ -89,11 +129,31 @@
/* MODAL PRIVATE METHODS
* ===================== */
function
backdrop
()
{
function
hideWithTransition
()
{
// firefox drops transitionEnd events :{o
var
that
=
this
,
animate
=
this
.
$element
.
hasClass
(
'
fade
'
)
?
'
fade
'
:
''
,
callback
=
$
.
proxy
(
show
,
this
)
,
timeout
=
setTimeout
(
function
()
{
that
.
$element
.
unbind
(
transitionEnd
)
hideModal
.
call
(
that
)
},
500
)
this
.
$element
.
one
(
transitionEnd
,
function
()
{
clearTimeout
(
timeout
)
hideModal
.
call
(
that
)
})
}
function
hideModal
(
that
)
{
this
.
$element
.
hide
()
.
trigger
(
'
hidden
'
)
backdrop
.
call
(
this
)
}
function
backdrop
(
callback
)
{
var
that
=
this
,
animate
=
this
.
$element
.
hasClass
(
'
fade
'
)
?
'
fade
'
:
''
if
(
this
.
isShown
&&
this
.
settings
.
backdrop
)
{
var
doAnimate
=
$
.
support
.
transition
&&
animate
...
...
@@ -111,43 +171,24 @@
this
.
$backdrop
.
addClass
(
'
in
'
)
doAnimate
?
this
.
$backdrop
.
one
(
$
.
support
.
transition
.
e
nd
,
callback
)
:
this
.
$backdrop
.
one
(
transitionE
nd
,
callback
)
:
callback
()
}
else
if
(
!
this
.
isShown
&&
this
.
$backdrop
)
{
this
.
$backdrop
.
removeClass
(
'
in
'
)
function
removeElement
()
{
that
.
$backdrop
.
remove
()
that
.
$backdrop
=
null
}
$
.
support
.
transition
&&
this
.
$element
.
hasClass
(
'
fade
'
)?
this
.
$backdrop
.
one
(
$
.
support
.
transition
.
end
,
removeElement
)
:
removeElement
()
this
.
$backdrop
.
one
(
transitionEnd
,
$
.
proxy
(
removeBackdrop
,
this
))
:
removeBackdrop
.
call
(
this
)
}
else
if
(
callback
)
{
callback
()
}
}
function
show
()
{
var
transition
=
$
.
support
.
transition
&&
that
.
$element
.
hasClass
(
'
fade
'
)
,
that
=
this
this
.
$element
.
appendTo
(
document
.
body
)
.
show
()
if
(
transition
)
{
this
.
$element
[
0
].
offsetWidth
// force reflow
}
this
.
$element
.
addClass
(
'
in
'
)
transition
?
this
.
$element
.
one
(
$
.
support
.
transition
.
end
,
function
()
{
that
.
$element
.
trigger
(
'
shown
'
)
})
:
this
.
$element
.
trigger
(
'
shown
'
)
function
removeBackdrop
()
{
this
.
$backdrop
.
remove
()
this
.
$backdrop
=
null
}
function
escape
()
{
...
...
@@ -205,10 +246,10 @@
}
/* MODAL DATA-IMPLEMENTATION
* ========================= */
/* MODAL DATA-
IMPLEMENTATION
* =========================
=
*/
$
(
function
()
{
$
(
document
).
ready
(
function
()
{
$
(
'
body
'
).
delegate
(
'
[data-controls-modal]
'
,
'
click
'
,
function
(
e
)
{
e
.
preventDefault
()
var
$this
=
$
(
this
).
data
(
'
show
'
,
true
)
...
...
js/bootstrap-popover.js
View file @
0b1d5d91
/* ===========================================================
* bootstrap-popover.js v
2.0
.0
* bootstrap-popover.js v
1.4
.0
* http://twitter.github.com/bootstrap/javascript.html#popover
* ===========================================================
* Copyright 2011 Twitter, Inc.
...
...
@@ -20,6 +20,8 @@
!
function
(
$
)
{
"
use strict
"
var
Popover
=
function
(
element
,
options
)
{
this
.
$element
=
$
(
element
)
this
.
options
=
options
...
...
@@ -35,33 +37,39 @@
setContent
:
function
()
{
var
$tip
=
this
.
tip
()
$tip
.
find
(
'
.title
'
)[
this
.
options
.
html
?
'
html
'
:
'
text
'
](
this
.
getTitle
())
$tip
.
find
(
'
.content
p
'
)[
this
.
options
.
html
?
'
html
'
:
'
text
'
](
this
.
getContent
())
$tip
.
find
(
'
.content
> *
'
)[
this
.
options
.
html
?
'
html
'
:
'
text
'
](
this
.
getContent
())
$tip
[
0
].
className
=
'
popover
'
}
,
hasContent
:
function
()
{
return
this
.
getTitle
()
||
this
.
getContent
()
}
,
getContent
:
function
()
{
var
content
,
$e
=
this
.
$element
,
o
=
this
.
options
if
(
typeof
this
.
options
.
content
==
'
string
'
)
{
content
=
$e
.
attr
(
o
.
content
)
content
=
$e
.
attr
(
this
.
options
.
content
)
}
else
if
(
typeof
this
.
options
.
content
==
'
function
'
)
{
content
=
this
.
options
.
content
.
call
(
this
.
$element
[
0
])
}
return
content
}
,
tip
:
function
()
{
if
(
!
this
.
$tip
)
{
this
.
$tip
=
$
(
'
<div class="popover" />
'
)
.
html
(
'
<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>
'
)
.
html
(
this
.
options
.
template
)
}
return
this
.
$tip
}
})
/* POPOVER PLUGIN DEFINITION
* ======================= */
...
...
@@ -71,6 +79,12 @@
return
this
}
$
.
fn
.
popover
.
defaults
=
$
.
extend
({}
,
$
.
fn
.
twipsy
.
defaults
,
{
content
:
'
data-content
'
,
placement
:
'
right
'
})
$
.
fn
.
popover
.
defaults
=
$
.
extend
({}
,
$
.
fn
.
twipsy
.
defaults
,
{
placement
:
'
right
'
,
content
:
'
data-content
'
,
template
:
'
<div class="arrow"></div><div class="inner"><h3 class="title"></h3><div class="content"><p></p></div></div>
'
})
$
.
fn
.
twipsy
.
rejectAttrOptions
.
push
(
'
content
'
)
}(
window
.
jQuery
||
window
.
ender
);
\ No newline at end of file
js/bootstrap-tabs.js
View file @
0b1d5d91
/* ========================================================
* bootstrap-tabs.js v
2.0
.0
* bootstrap-tabs.js v
1.4
.0
* http://twitter.github.com/bootstrap/javascript.html#tabs
* ========================================================
* Copyright 2011 Twitter, Inc.
...
...
@@ -20,6 +20,8 @@
!
function
(
$
){
"
use strict
"
function
activate
(
element
,
container
)
{
container
.
find
(
'
> .active
'
)
...
...
@@ -39,6 +41,7 @@
,
$ul
=
$this
.
closest
(
'
ul:not(.dropdown-menu)
'
)
,
href
=
$this
.
attr
(
'
href
'
)
,
previous
,
$href
if
(
/^#
\w
+/
.
test
(
href
)
)
{
e
.
preventDefault
()
...
...
@@ -64,8 +67,14 @@
/* TABS/PILLS PLUGIN DEFINITION
* ============================ */
$
(
function
()
{
$
(
'
body
'
).
delegate
(
'
ul[data-tabs] > li > a, ul[data-pills] > li > a
'
,
'
click
'
,
tab
)
$
.
fn
.
tabs
=
$
.
fn
.
pills
=
function
(
selector
)
{
return
this
.
each
(
function
()
{
$
(
this
).
delegate
(
selector
||
'
.tabs li > a, .pills > li > a
'
,
'
click
'
,
tab
)
})
}
$
(
document
).
ready
(
function
()
{
$
(
'
body
'
).
tabs
(
'
ul[data-tabs] li > a, ul[data-pills] > li > a
'
)
})
}(
window
.
jQuery
||
window
.
ender
);
\ No newline at end of file
js/bootstrap-twipsy.js
View file @
0b1d5d91
/* ==========================================================
* bootstrap-twipsy.js v
2.0
.0
* bootstrap-twipsy.js v
1.4
.0
* http://twitter.github.com/bootstrap/javascript.html#twipsy
* Adapted from the original jQuery.tipsy by Jason Frame
* ==========================================================
...
...
@@ -21,6 +21,37 @@
!
function
(
$
)
{
"
use strict
"
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
* ======================================================= */
var
transitionEnd
$
(
document
).
ready
(
function
()
{
$
.
support
.
transition
=
(
function
()
{
var
thisBody
=
document
.
body
||
document
.
documentElement
,
thisStyle
=
thisBody
.
style
,
support
=
thisStyle
.
transition
!==
undefined
||
thisStyle
.
WebkitTransition
!==
undefined
||
thisStyle
.
MozTransition
!==
undefined
||
thisStyle
.
MsTransition
!==
undefined
||
thisStyle
.
OTransition
!==
undefined
return
support
})()
// set CSS transition event type
if
(
$
.
support
.
transition
)
{
transitionEnd
=
"
TransitionEnd
"
if
(
$
.
browser
.
webkit
)
{
transitionEnd
=
"
webkitTransitionEnd
"
}
else
if
(
$
.
browser
.
mozilla
)
{
transitionEnd
=
"
transitionend
"
}
else
if
(
$
.
browser
.
opera
)
{
transitionEnd
=
"
oTransitionEnd
"
}
}
})
/* TWIPSY PUBLIC CLASS DEFINITION
* ============================== */
...
...
@@ -41,7 +72,7 @@
,
$tip
,
tp
if
(
this
.
getTitle
()
&&
this
.
enabled
)
{
if
(
this
.
hasContent
()
&&
this
.
enabled
)
{
$tip
=
this
.
tip
()
this
.
setContent
()
...
...
@@ -61,7 +92,8 @@
actualWidth
=
$tip
[
0
].
offsetWidth
actualHeight
=
$tip
[
0
].
offsetHeight
placement
=
_
.
maybeCall
(
this
.
options
.
placement
,
this
.
$element
[
0
])
placement
=
maybeCall
(
this
.
options
.
placement
,
this
,
[
$tip
[
0
],
this
.
$element
[
0
]
])
switch
(
placement
)
{
case
'
below
'
:
...
...
@@ -102,7 +134,7 @@
}
$
.
support
.
transition
&&
this
.
$tip
.
hasClass
(
'
fade
'
)
?
$tip
.
bind
(
$
.
support
.
transition
.
e
nd
,
removeElement
)
:
$tip
.
bind
(
transitionE
nd
,
removeElement
)
:
removeElement
()
}
...
...
@@ -113,6 +145,10 @@
}
}
,
hasContent
:
function
()
{
return
this
.
getTitle
()
}
,
getTitle
:
function
()
{
var
title
,
$e
=
this
.
$element
...
...
@@ -132,10 +168,7 @@
}
,
tip
:
function
()
{
if
(
!
this
.
$tip
)
{
this
.
$tip
=
$
(
'
<div class="twipsy" />
'
).
html
(
'
<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>
'
)
}
return
this
.
$tip
return
this
.
$tip
=
this
.
$tip
||
$
(
'
<div class="twipsy" />
'
).
html
(
this
.
options
.
template
)
}
,
validate
:
function
()
{
...
...
@@ -158,21 +191,20 @@
this
.
enabled
=
!
this
.
enabled
}
,
toggle
:
function
()
{
this
[
this
.
tip
().
hasClass
(
'
in
'
)
?
'
hide
'
:
'
show
'
]()
}
}
/* TWIPSY PRIVATE METHODS
* ====================== */
var
_
=
{
maybeCall
:
function
(
thing
,
ctx
)
{
return
(
typeof
thing
==
'
function
'
)
?
(
thing
.
call
(
ctx
))
:
thing
}
function
maybeCall
(
thing
,
ctx
,
args
)
{
return
typeof
thing
==
'
function
'
?
thing
.
apply
(
ctx
,
args
)
:
thing
}
/* TWIPSY PLUGIN DEFINITION
* ======================== */
...
...
@@ -269,10 +301,21 @@
,
offset
:
0
,
title
:
'
title
'
,
trigger
:
'
hover
'
,
template
:
'
<div class="twipsy-arrow"></div><div class="twipsy-inner"></div>
'
}
$
.
fn
.
twipsy
.
rejectAttrOptions
=
[
'
title
'
]
$
.
fn
.
twipsy
.
elementOptions
=
function
(
ele
,
options
)
{
return
$
.
metadata
?
$
.
extend
({},
options
,
$
(
ele
).
metadata
())
:
options
var
data
=
$
(
ele
).
data
()
,
rejects
=
$
.
fn
.
twipsy
.
rejectAttrOptions
,
i
=
rejects
.
length
while
(
i
--
)
{
delete
data
[
rejects
[
i
]]
}
return
$
.
extend
({},
options
,
data
)
}
}(
window
.
jQuery
||
window
.
ender
);
\ No newline at end of file
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