aboutsummaryrefslogtreecommitdiff
path: root/js/tests/unit/tooltip.js
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-12-18 13:01:43 -0800
committerMark Otto <[email protected]>2013-12-18 13:01:43 -0800
commit3f577ab86c4e07493d5d24f5fdd3dba30c199400 (patch)
treeebce071d4991a8de6ea8440aef9093b92bb5d66b /js/tests/unit/tooltip.js
parentee709db67952c53b417a172534f24034eb2a92c8 (diff)
parentba3639b2025b8f0c510087ff8fe522c2bf0b06f1 (diff)
downloadbootstrap-3f577ab86c4e07493d5d24f5fdd3dba30c199400.tar.xz
bootstrap-3f577ab86c4e07493d5d24f5fdd3dba30c199400.zip
Merge pull request #11881 from ZDroid/patch-1
Require comma on left side
Diffstat (limited to 'js/tests/unit/tooltip.js')
-rw-r--r--js/tests/unit/tooltip.js40
1 files changed, 20 insertions, 20 deletions
diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js
index dbfeacb82..d921bee7f 100644
--- a/js/tests/unit/tooltip.js
+++ b/js/tests/unit/tooltip.js
@@ -299,8 +299,8 @@ $(function () {
test('should place tooltip inside window', function () {
var container = $('<div />').appendTo('body')
- .css({position: 'absolute', width: 200, height: 200, bottom: 0, left: 0})
- , tooltip = $('<a href="#" title="Very very very very very very very very long tooltip">Hover me</a>')
+ .css({position: 'absolute', width: 200, height: 200, bottom: 0, left: 0}),
+ tooltip = $('<a href="#" title="Very very very very very very very very long tooltip">Hover me</a>')
.css({position: 'absolute', top: 0, left: 0})
.appendTo(container)
.tooltip({placement: 'top', animate: false})
@@ -318,13 +318,13 @@ $(function () {
test('should place tooltip on top of element', function () {
var container = $('<div />').appendTo('body')
- .css({position: 'absolute', bottom: 0, left: 0, textAlign: 'right', width: 300, height: 300})
- , p = $('<p style="margin-top:200px" />').appendTo(container)
- , tooltiped = $('<a href="#" title="very very very very very very very long tooltip">Hover me</a>')
- .css({marginTop: 200})
- .appendTo(p)
- .tooltip({placement: 'top', animate: false})
- .tooltip('show')
+ .css({position: 'absolute', bottom: 0, left: 0, textAlign: 'right', width: 300, height: 300}),
+ p = $('<p style="margin-top:200px" />').appendTo(container),
+ tooltiped = $('<a href="#" title="very very very very very very very long tooltip">Hover me</a>')
+ .css({marginTop: 200})
+ .appendTo(p)
+ .tooltip({placement: 'top', animate: false})
+ .tooltip('show')
stop()
@@ -340,12 +340,12 @@ $(function () {
test('should add position class before positioning so that position-specific styles are taken into account', function () {
$('head').append('<style> .tooltip.right { white-space: nowrap; } .tooltip.right .tooltip-inner { max-width: none; } </style>')
- var container = $('<div />').appendTo('body')
- , target = $('<a href="#" rel="tooltip" title="very very very very very very very very long tooltip in one line"></a>')
+ var container = $('<div />').appendTo('body'),
+ target = $('<a href="#" rel="tooltip" title="very very very very very very very very long tooltip in one line"></a>')
.appendTo(container)
.tooltip({placement: 'right'})
- .tooltip('show')
- , tooltip = container.find('.tooltip')
+ .tooltip('show'),
+ tooltip = container.find('.tooltip')
ok( Math.round(target.offset().top + (target[0].offsetHeight / 2) - (tooltip[0].offsetHeight / 2)) === Math.round(tooltip.offset().top) )
target.tooltip('hide')
@@ -389,13 +389,13 @@ $(function () {
test('tooltips should be placed dynamically, with the dynamic placement option', function () {
$.support.transition = false
var ttContainer = $('<div id="dynamic-tt-test"/>').css({
- 'height' : 400
- , 'overflow' : 'hidden'
- , 'position' : 'absolute'
- , 'top' : 0
- , 'left' : 0
- , 'width' : 600})
- .appendTo('body')
+ 'height' : 400,
+ 'overflow' : 'hidden',
+ 'position' : 'absolute',
+ 'top' : 0,
+ 'left' : 0,
+ 'width' : 600})
+ .appendTo('body')
var topTooltip = $('<div style="display: inline-block; position: absolute; left: 0; top: 0;" rel="tooltip" title="Top tooltip">Top Dynamic Tooltip</div>')
.appendTo('#dynamic-tt-test')