diff options
| author | Mark Otto <[email protected]> | 2013-12-18 13:06:47 -0800 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2013-12-18 13:06:47 -0800 |
| commit | 5bba8744679ddead8673c003997410c71fc47000 (patch) | |
| tree | 7cb520f428a788652871240a19a9fcc401ecf9f6 /js/tests/unit/tooltip.js | |
| parent | 6315043b1c11c6391f155e0c7299783a13cfee74 (diff) | |
| parent | 3f577ab86c4e07493d5d24f5fdd3dba30c199400 (diff) | |
| download | bootstrap-5bba8744679ddead8673c003997410c71fc47000.tar.xz bootstrap-5bba8744679ddead8673c003997410c71fc47000.zip | |
Merge branch 'master' into docs_derp
Diffstat (limited to 'js/tests/unit/tooltip.js')
| -rw-r--r-- | js/tests/unit/tooltip.js | 40 |
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') |
