diff options
| author | Mark Otto <[email protected]> | 2017-05-26 22:28:09 -0700 |
|---|---|---|
| committer | Mark Otto <[email protected]> | 2017-05-26 22:28:09 -0700 |
| commit | 6c3f833076a9fa68601741e3e21bd07ad79b7d8a (patch) | |
| tree | fe016946d77f9ffff15bbe9cdc593fd098b5bcc7 /js/tests | |
| parent | c581564a780974c6430ac5897740006f623f2277 (diff) | |
| parent | 5d7db507396275fcda96935aff47b09e1d79ddc1 (diff) | |
| download | bootstrap-6c3f833076a9fa68601741e3e21bd07ad79b7d8a.tar.xz bootstrap-6c3f833076a9fa68601741e3e21bd07ad79b7d8a.zip | |
Merge branch 'v4-docs-streamlined' of https://github.com/twbs/bootstrap into v4-docs-streamlined
Diffstat (limited to 'js/tests')
| -rw-r--r-- | js/tests/.eslintrc.json | 40 | ||||
| -rw-r--r-- | js/tests/unit/alert.js | 8 | ||||
| -rw-r--r-- | js/tests/unit/button.js | 22 | ||||
| -rw-r--r-- | js/tests/unit/carousel.js | 65 | ||||
| -rw-r--r-- | js/tests/unit/collapse.js | 51 | ||||
| -rw-r--r-- | js/tests/unit/dropdown.js | 36 | ||||
| -rw-r--r-- | js/tests/unit/modal.js | 75 | ||||
| -rw-r--r-- | js/tests/unit/phantom.js | 31 | ||||
| -rw-r--r-- | js/tests/unit/popover.js | 16 | ||||
| -rw-r--r-- | js/tests/unit/scrollspy.js | 58 | ||||
| -rw-r--r-- | js/tests/unit/tab.js | 88 | ||||
| -rw-r--r-- | js/tests/unit/tooltip.js | 90 | ||||
| -rw-r--r-- | js/tests/visual/alert.html | 77 | ||||
| -rw-r--r-- | js/tests/visual/button.html | 112 | ||||
| -rw-r--r-- | js/tests/visual/carousel.html | 114 | ||||
| -rw-r--r-- | js/tests/visual/collapse.html | 133 | ||||
| -rw-r--r-- | js/tests/visual/dropdown.html | 149 | ||||
| -rw-r--r-- | js/tests/visual/modal.html | 402 | ||||
| -rw-r--r-- | js/tests/visual/popover.html | 85 | ||||
| -rw-r--r-- | js/tests/visual/scrollspy.html | 171 | ||||
| -rw-r--r-- | js/tests/visual/tab.html | 299 | ||||
| -rw-r--r-- | js/tests/visual/tooltip.html | 91 |
22 files changed, 1321 insertions, 892 deletions
diff --git a/js/tests/.eslintrc.json b/js/tests/.eslintrc.json new file mode 100644 index 000000000..7ae9cf966 --- /dev/null +++ b/js/tests/.eslintrc.json @@ -0,0 +1,40 @@ +{ + "env": { + "qunit": true, + "es6": false + }, + "globals": { + "Util": false + }, + "parserOptions": { + "ecmaVersion": 5, + "sourceType": "script" + }, + "rules": { + // Best Practices + "consistent-return": "off", + "no-alert": "off", + "no-console": "off", + "no-empty-function": "off", + "no-extend-native": "off", + "no-magic-numbers": "off", + "vars-on-top": "off", + + // Strict Mode + "strict": "off", + + // Stylistic Issues + "brace-style": "off", + "func-style": "off", + "max-statements-per-line": "off", + "object-curly-newline": "off", + "object-property-newline": "off", + + // ECMAScript 6 + "no-var": "off", + "object-shorthand": "off", + "prefer-arrow-callback": "off", + "prefer-template": "off", + "prefer-rest-params": "off" + } +} diff --git a/js/tests/unit/alert.js b/js/tests/unit/alert.js index 97818960a..e078082c3 100644 --- a/js/tests/unit/alert.js +++ b/js/tests/unit/alert.js @@ -1,5 +1,5 @@ $(function () { - 'use strict'; + 'use strict' QUnit.module('alert plugin') @@ -34,7 +34,7 @@ $(function () { QUnit.test('should fade element out on clicking .close', function (assert) { assert.expect(1) - var alertHTML = '<div class="alert alert-danger fade in">' + var alertHTML = '<div class="alert alert-danger fade show">' + '<a class="close" href="#" data-dismiss="alert">×</a>' + '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' + '</div>' @@ -43,12 +43,12 @@ $(function () { $alert.find('.close').trigger('click') - assert.strictEqual($alert.hasClass('in'), false, 'remove .in class on .close click') + assert.strictEqual($alert.hasClass('show'), false, 'remove .show class on .close click') }) QUnit.test('should remove element when clicking .close', function (assert) { assert.expect(2) - var alertHTML = '<div class="alert alert-danger fade in">' + var alertHTML = '<div class="alert alert-danger fade show">' + '<a class="close" href="#" data-dismiss="alert">×</a>' + '<p><strong>Holy guacamole!</strong> Best check yo self, you\'re not looking too good.</p>' + '</div>' diff --git a/js/tests/unit/button.js b/js/tests/unit/button.js index 5648506cf..d87b57610 100644 --- a/js/tests/unit/button.js +++ b/js/tests/unit/button.js @@ -1,5 +1,5 @@ $(function () { - 'use strict'; + 'use strict' QUnit.module('button plugin') @@ -72,6 +72,26 @@ $(function () { assert.strictEqual($btn.attr('aria-pressed'), 'true', 'btn aria-pressed state is true') }) + QUnit.test('should trigger input change event when toggled button has input field', function (assert) { + assert.expect(1) + var done = assert.async() + + var groupHTML = '<div class="btn-group" data-toggle="buttons">' + + '<label class="btn btn-primary">' + + '<input type="radio" id="radio" autocomplete="off">Radio' + + '</label>' + + '</div>' + var $group = $(groupHTML).appendTo('#qunit-fixture') + + $group.find('input').on('change', function (e) { + e.preventDefault() + assert.ok(true, 'change event fired') + done() + }) + + $group.find('label').trigger('click') + }) + QUnit.test('should check for closest matching toggle', function (assert) { assert.expect(12) var groupHTML = '<div class="btn-group" data-toggle="buttons">' diff --git a/js/tests/unit/carousel.js b/js/tests/unit/carousel.js index d6d0186e1..dbdea921a 100644 --- a/js/tests/unit/carousel.js +++ b/js/tests/unit/carousel.js @@ -1,5 +1,5 @@ $(function () { - 'use strict'; + 'use strict' QUnit.module('carousel plugin') @@ -507,6 +507,37 @@ $(function () { assert.strictEqual($template.find('.carousel-item')[1], $template.find('.active')[0], 'second item active') }) + QUnit.test('should not prevent keydown if key is not ARROW_LEFT or ARROW_RIGHT', function (assert) { + assert.expect(2) + var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false">' + + '<div class="carousel-inner">' + + '<div id="first" class="carousel-item active">' + + '<img alt="">' + + '</div>' + + '</div>' + + '</div>' + var $template = $(templateHTML) + + $template.bootstrapCarousel() + var done = assert.async() + + var eventArrowDown = $.Event('keydown', { which: 40 }) + var eventArrowUp = $.Event('keydown', { which: 38 }) + + $template.one('keydown', function (event) { + assert.strictEqual(event.isDefaultPrevented(), false) + }) + + $template.trigger(eventArrowDown) + + $template.one('keydown', function (event) { + assert.strictEqual(event.isDefaultPrevented(), false) + done() + }) + + $template.trigger(eventArrowUp) + }) + QUnit.test('should support disabling the keyboard navigation', function (assert) { assert.expect(3) var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false" data-keyboard="false">' @@ -759,4 +790,36 @@ $(function () { .bootstrapCarousel('prev') assert.strictEqual($carousel.find('.carousel-item.active').attr('id'), 'one', 'carousel did not wrap around and stayed on 1st slide') }) + + QUnit.test('should not prevent keydown for inputs and textareas', function (assert) { + assert.expect(2) + var templateHTML = '<div id="myCarousel" class="carousel" data-interval="false">' + + '<div class="carousel-inner">' + + '<div id="first" class="carousel-item">' + + '<input type="text" id="inputText" />' + + '</div>' + + '<div id="second" class="carousel-item active">' + + '<textarea id="txtArea"></textarea>' + + '</div>' + + '</div>' + + '</div>' + var $template = $(templateHTML) + var done = assert.async() + $template.appendTo('#qunit-fixture') + var $inputText = $template.find('#inputText') + var $textArea = $template.find('#txtArea') + $template.bootstrapCarousel() + + var eventKeyDown = $.Event('keydown', { which: 65 }) // 65 for "a" + $inputText.on('keydown', function (event) { + assert.strictEqual(event.isDefaultPrevented(), false) + }) + $inputText.trigger(eventKeyDown) + + $textArea.on('keydown', function (event) { + assert.strictEqual(event.isDefaultPrevented(), false) + done() + }) + $textArea.trigger(eventKeyDown) + }) }) diff --git a/js/tests/unit/collapse.js b/js/tests/unit/collapse.js index 892da52ed..713930433 100644 --- a/js/tests/unit/collapse.js +++ b/js/tests/unit/collapse.js @@ -1,5 +1,5 @@ $(function () { - 'use strict'; + 'use strict' QUnit.module('collapse plugin') @@ -48,15 +48,38 @@ $(function () { assert.expect(2) var $el = $('<div class="collapse"/>').bootstrapCollapse('show') - assert.ok($el.hasClass('in'), 'has class "in"') + assert.ok($el.hasClass('show'), 'has class "show"') assert.ok(!/height/i.test($el.attr('style')), 'has height reset') }) + QUnit.test('should collapse only the first collapse', function (assert) { + assert.expect(2) + var html = [ + '<div class="panel-group" id="accordion1">', + '<div class="panel">', + '<div id="collapse1" class="collapse"/>', + '</div>', + '</div>', + '<div class="panel-group" id="accordion2">', + '<div class="panel">', + '<div id="collapse2" class="collapse show"/>', + '</div>', + '</div>' + ].join('') + $(html).appendTo('#qunit-fixture') + var $el1 = $('#collapse1') + var $el2 = $('#collapse2') + $el1.bootstrapCollapse('show') + + assert.ok($el1.hasClass('show')) + assert.ok($el2.hasClass('show')) + }) + QUnit.test('should hide a collapsed element', function (assert) { assert.expect(1) var $el = $('<div class="collapse"/>').bootstrapCollapse('hide') - assert.ok(!$el.hasClass('in'), 'does not have class "in"') + assert.ok(!$el.hasClass('show'), 'does not have class "show"') }) QUnit.test('should not fire shown when show is prevented', function (assert) { @@ -127,7 +150,7 @@ $(function () { var $target = $('<a role="button" data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture') - $('<div id="test1" class="in"/>') + $('<div id="test1" class="show"/>') .appendTo('#qunit-fixture') .on('hidden.bs.collapse', function () { assert.ok($target.hasClass('collapsed'), 'target has collapsed class') @@ -162,7 +185,7 @@ $(function () { var $target = $('<a role="button" data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture') var $alt = $('<a role="button" data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture') - $('<div id="test1" class="in"/>') + $('<div id="test1" class="show"/>') .appendTo('#qunit-fixture') .on('hidden.bs.collapse', function () { assert.ok($target.hasClass('collapsed'), 'target has collapsed class') @@ -177,7 +200,7 @@ $(function () { assert.expect(0) var done = assert.async() - var $test = $('<div id="test1" class="in"/>') + var $test = $('<div id="test1" class="show"/>') .appendTo('#qunit-fixture') .on('hide.bs.collapse', function () { assert.ok(false) @@ -221,7 +244,7 @@ $(function () { assert.expect(1) var done = assert.async() - $('<div class="collapse in"></div>') + $('<div class="collapse show"></div>') .appendTo('#qunit-fixture') .on('hide.bs.collapse', function () { assert.ok(true, 'hiding a previously-uninitialized shown collapse when the "hide" method is called') @@ -244,7 +267,7 @@ $(function () { var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0)) - $('<div id="body1" class="in"/>').appendTo($groups.eq(0)) + $('<div id="body1" class="show"/>').appendTo($groups.eq(0)) var $target2 = $('<a class="collapsed" data-toggle="collapse" role="button" href="#body2" data-parent="#accordion"/>').appendTo($groups.eq(1)) @@ -278,7 +301,7 @@ $(function () { var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent=".accordion"/>').appendTo($groups.eq(0)) - $('<div id="body1" class="in"/>').appendTo($groups.eq(0)) + $('<div id="body1" class="show"/>').appendTo($groups.eq(0)) var $target2 = $('<a class="collapsed" data-toggle="collapse" role="button" href="#body2" data-parent=".accordion"/>').appendTo($groups.eq(1)) @@ -321,7 +344,7 @@ $(function () { var $target = $('<a role="button" data-toggle="collapse" href="#test1" aria-expanded="true"/>').appendTo('#qunit-fixture') - $('<div id="test1" class="in"/>') + $('<div id="test1" class="show"/>') .appendTo('#qunit-fixture') .on('hidden.bs.collapse', function () { assert.strictEqual($target.attr('aria-expanded'), 'false', 'aria-expanded on target is "false"') @@ -356,7 +379,7 @@ $(function () { var $target = $('<a role="button" data-toggle="collapse" href="#test1" aria-expanded="true"/>').appendTo('#qunit-fixture') var $alt = $('<a role="button" data-toggle="collapse" href="#test1" aria-expanded="true"/>').appendTo('#qunit-fixture') - $('<div id="test1" class="in"/>') + $('<div id="test1" class="show"/>') .appendTo('#qunit-fixture') .on('hidden.bs.collapse', function () { assert.strictEqual($target.attr('aria-expanded'), 'false', 'aria-expanded on target is "false"') @@ -380,7 +403,7 @@ $(function () { var $target1 = $('<a role="button" data-toggle="collapse" href="#body1" data-parent="#accordion"/>').appendTo($groups.eq(0)) - $('<div id="body1" aria-expanded="true" class="in"/>').appendTo($groups.eq(0)) + $('<div id="body1" aria-expanded="true" class="show"/>').appendTo($groups.eq(0)) var $target2 = $('<a role="button" data-toggle="collapse" href="#body2" data-parent="#accordion" class="collapsed" />').appendTo($groups.eq(1)) @@ -426,7 +449,7 @@ $(function () { $target2.trigger('click') $body2 - .toggleClass('in collapsing') + .toggleClass('show collapsing') .data('bs.collapse')._isTransitioning = 1 $target1.trigger('click') @@ -443,7 +466,7 @@ $(function () { var $target = $('<a role="button" data-toggle="collapse" href="#test1"/>').appendTo('#qunit-fixture') - $('<div id="test1" class="in"/>') + $('<div id="test1" class="show"/>') .appendTo('#qunit-fixture') .on('hidden.bs.collapse', function () { assert.ok($target.hasClass('collapsed')) diff --git a/js/tests/unit/dropdown.js b/js/tests/unit/dropdown.js index e6cda58d4..53455c2a6 100644 --- a/js/tests/unit/dropdown.js +++ b/js/tests/unit/dropdown.js @@ -1,5 +1,5 @@ $(function () { - 'use strict'; + 'use strict' QUnit.module('dropdowns plugin') @@ -59,7 +59,7 @@ $(function () { + '</ul>' var $dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').bootstrapDropdown().trigger('click') - assert.ok(!$dropdown.parent('.dropdown').hasClass('open'), '"open" class added on click') + assert.ok(!$dropdown.parent('.dropdown').hasClass('show'), '"show" class added on click') }) QUnit.test('should set aria-expanded="true" on target when dropdown menu is shown', function (assert) { @@ -128,10 +128,10 @@ $(function () { + '</ul>' var $dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').bootstrapDropdown().trigger('click') - assert.ok(!$dropdown.parent('.dropdown').hasClass('open'), '"open" class added on click') + assert.ok(!$dropdown.parent('.dropdown').hasClass('show'), '"show" class added on click') }) - QUnit.test('should add class open to menu if clicked', function (assert) { + QUnit.test('should add class show to menu if clicked', function (assert) { assert.expect(1) var dropdownHTML = '<ul class="tabs">' + '<li class="dropdown">' @@ -146,7 +146,7 @@ $(function () { + '</ul>' var $dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').bootstrapDropdown().trigger('click') - assert.ok($dropdown.parent('.dropdown').hasClass('open'), '"open" class added on click') + assert.ok($dropdown.parent('.dropdown').hasClass('show'), '"show" class added on click') }) QUnit.test('should test if element has a # before assuming it\'s a selector', function (assert) { @@ -164,11 +164,11 @@ $(function () { + '</ul>' var $dropdown = $(dropdownHTML).find('[data-toggle="dropdown"]').bootstrapDropdown().trigger('click') - assert.ok($dropdown.parent('.dropdown').hasClass('open'), '"open" class added on click') + assert.ok($dropdown.parent('.dropdown').hasClass('show'), '"show" class added on click') }) - QUnit.test('should remove "open" class if body is clicked', function (assert) { + QUnit.test('should remove "show" class if body is clicked', function (assert) { assert.expect(2) var dropdownHTML = '<ul class="tabs">' + '<li class="dropdown">' @@ -187,12 +187,12 @@ $(function () { .bootstrapDropdown() .trigger('click') - assert.ok($dropdown.parent('.dropdown').hasClass('open'), '"open" class added on click') + assert.ok($dropdown.parent('.dropdown').hasClass('show'), '"show" class added on click') $(document.body).trigger('click') - assert.ok(!$dropdown.parent('.dropdown').hasClass('open'), '"open" class removed') + assert.ok(!$dropdown.parent('.dropdown').hasClass('show'), '"show" class removed') }) - QUnit.test('should remove "open" class if body is clicked, with multiple dropdowns', function (assert) { + QUnit.test('should remove "show" class if body is clicked, with multiple dropdowns', function (assert) { assert.expect(7) var dropdownHTML = '<ul class="nav">' + '<li><a href="#menu1">Menu 1</a></li>' @@ -217,16 +217,16 @@ $(function () { assert.strictEqual($dropdowns.length, 2, 'two dropdowns') $first.trigger('click') - assert.strictEqual($first.parents('.open').length, 1, '"open" class added on click') - assert.strictEqual($('#qunit-fixture .open').length, 1, 'only one dropdown is open') + assert.strictEqual($first.parents('.show').length, 1, '"show" class added on click') + assert.strictEqual($('#qunit-fixture .show').length, 1, 'only one dropdown is shown') $(document.body).trigger('click') - assert.strictEqual($('#qunit-fixture .open').length, 0, '"open" class removed') + assert.strictEqual($('#qunit-fixture .show').length, 0, '"show" class removed') $last.trigger('click') - assert.strictEqual($last.parent('.open').length, 1, '"open" class added on click') - assert.strictEqual($('#qunit-fixture .open').length, 1, 'only one dropdown is open') + assert.strictEqual($last.parent('.show').length, 1, '"show" class added on click') + assert.strictEqual($('#qunit-fixture .show').length, 1, 'only one dropdown is shown') $(document.body).trigger('click') - assert.strictEqual($('#qunit-fixture .open').length, 0, '"open" class removed') + assert.strictEqual($('#qunit-fixture .show').length, 0, '"show" class removed') }) QUnit.test('should fire show and hide event', function (assert) { @@ -411,7 +411,7 @@ $(function () { $('#textField').trigger('click') - assert.ok($dropdown.parent('.btn-group').hasClass('open'), 'dropdown menu is open') + assert.ok($dropdown.parent('.btn-group').hasClass('show'), 'dropdown menu is shown') }) QUnit.test('should not close the dropdown if the user clicks on a textarea', function (assert) { @@ -430,6 +430,6 @@ $(function () { $('#textArea').trigger('click') - assert.ok($dropdown.parent('.btn-group').hasClass('open'), 'dropdown menu is open') + assert.ok($dropdown.parent('.btn-group').hasClass('show'), 'dropdown menu is shown') }) }) diff --git a/js/tests/unit/modal.js b/js/tests/unit/modal.js index 28c1e0ec7..7af5aeb27 100644 --- a/js/tests/unit/modal.js +++ b/js/tests/unit/modal.js @@ -1,5 +1,5 @@ $(function () { - 'use strict'; + 'use strict' QUnit.module('modal plugin') @@ -174,6 +174,19 @@ $(function () { .bootstrapModal('show') }) + QUnit.test('should not close modal when clicking outside of modal-content if data-backdrop="true"', function (assert) { + assert.expect(1) + var done = assert.async() + + $('<div id="modal-test" data-backdrop="false"><div class="contents"/></div>') + .on('shown.bs.modal', function () { + $('#modal-test').trigger('click') + assert.ok($('#modal-test').is(':visible'), 'modal not hidden') + done() + }) + .bootstrapModal('show') + }) + QUnit.test('should close modal when escape key is pressed via keydown', function (assert) { assert.expect(3) var done = assert.async() @@ -363,6 +376,44 @@ $(function () { .bootstrapModal('show') }) + QUnit.test('should have a paddingRight when the modal is taller than the viewport', function (assert) { + assert.expect(2) + var done = assert.async() + $('<div class="navbar-fixed-top navbar-fixed-bottom is-fixed">@Johann-S</div>').appendTo('#qunit-fixture') + $('.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed').css('padding-right', '10px') + + $('<div id="modal-test"/>') + .on('shown.bs.modal', function () { + var paddingRight = parseInt($(document.body).css('padding-right'), 10) + assert.strictEqual(isNaN(paddingRight), false) + assert.strictEqual(paddingRight !== 0, true) + $(document.body).css('padding-right', '') // Because test case "should ignore other inline styles when trying to restore body padding after closing" fail if not + done() + }) + .bootstrapModal('show') + }) + + QUnit.test('should remove padding-right on modal after closing', function (assert) { + assert.expect(3) + var done = assert.async() + $('<div class="navbar-fixed-top navbar-fixed-bottom is-fixed">@Johann-S</div>').appendTo('#qunit-fixture') + $('.navbar-fixed-top, .navbar-fixed-bottom, .is-fixed').css('padding-right', '10px') + + $('<div id="modal-test"/>') + .on('shown.bs.modal', function () { + var paddingRight = parseInt($(document.body).css('padding-right'), 10) + assert.strictEqual(isNaN(paddingRight), false) + assert.strictEqual(paddingRight !== 0, true) + $(this).bootstrapModal('hide') + }) + .on('hidden.bs.modal', function () { + var paddingRight = parseInt($(document.body).css('padding-right'), 10) + assert.strictEqual(paddingRight, 0) + done() + }) + .bootstrapModal('show') + }) + QUnit.test('should ignore other inline styles when trying to restore body padding after closing', function (assert) { assert.expect(2) var done = assert.async() @@ -403,4 +454,26 @@ $(function () { }) .bootstrapModal('show') }) + + QUnit.test('should not follow link in area tag', function (assert) { + assert.expect(2) + var done = assert.async() + + $('<map><area id="test" shape="default" data-toggle="modal" data-target="#modal-test" href="demo.html"/></map>') + .appendTo('#qunit-fixture') + + $('<div id="modal-test"><div class="contents"><div id="close" data-dismiss="modal"/></div></div>') + .appendTo('#qunit-fixture') + + $('#test') + .on('click.bs.modal.data-api', function (event) { + assert.notOk(event.isDefaultPrevented(), 'navigating to href will happen') + + setTimeout(function () { + assert.ok(event.isDefaultPrevented(), 'model shown instead of navigating to href') + done() + }, 1) + }) + .trigger('click') + }) }) diff --git a/js/tests/unit/phantom.js b/js/tests/unit/phantom.js index 525aea002..eea7486a4 100644 --- a/js/tests/unit/phantom.js +++ b/js/tests/unit/phantom.js @@ -7,7 +7,7 @@ */ (function () { - 'use strict'; + 'use strict' // Don't re-order tests. QUnit.config.reorder = false @@ -70,32 +70,3 @@ }) }()) - - -// bind polyfill -// shoutout mdn: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function/bind#Polyfill - -if (!Function.prototype.bind) { - Function.prototype.bind = function (oThis) { - if (typeof this !== 'function') { - // closest thing possible to the ECMAScript 5 - // internal IsCallable function - throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable'); - } - - var aArgs = Array.prototype.slice.call(arguments, 1) - var fToBind = this - var FNOP = function () {} - var fBound = function () { - return fToBind.apply(this instanceof FNOP ? this : oThis, aArgs.concat(Array.prototype.slice.call(arguments))) - } - - if (this.prototype) { - // native functions don't have a prototype - FNOP.prototype = this.prototype - } - fBound.prototype = new FNOP() - - return fBound - } -} diff --git a/js/tests/unit/popover.js b/js/tests/unit/popover.js index fcd7791d2..5452def58 100644 --- a/js/tests/unit/popover.js +++ b/js/tests/unit/popover.js @@ -1,5 +1,5 @@ $(function () { - 'use strict'; + 'use strict' QUnit.module('popover plugin') @@ -229,7 +229,7 @@ $(function () { $popover.bootstrapPopover('show') $popover.bootstrapPopover('dispose') - assert.ok(!$popover.hasClass('in'), 'popover is hidden') + assert.ok(!$popover.hasClass('show'), 'popover is hidden') assert.ok(!$popover.data('popover'), 'popover does not have data') assert.strictEqual($._data($popover[0], 'events').click[0].namespace, 'foo', 'popover still has click.foo') assert.ok(!$._data($popover[0], 'events').mouseover && !$._data($popover[0], 'events').mouseout, 'popover does not have any events') @@ -320,4 +320,16 @@ $(function () { .bootstrapPopover('show') }) + QUnit.test('should throw an error when show is called on hidden elements', function (assert) { + assert.expect(1) + var done = assert.async() + + try { + $('<div data-toggle="popover" data-title="some title" data-content="@Johann-S" style="display: none"/>').bootstrapPopover('show') + } + catch (err) { + assert.strictEqual(err.message, 'Please use show on visible elements') + done() + } + }) }) diff --git a/js/tests/unit/scrollspy.js b/js/tests/unit/scrollspy.js index 97ddd16ec..877ec67a2 100644 --- a/js/tests/unit/scrollspy.js +++ b/js/tests/unit/scrollspy.js @@ -1,5 +1,5 @@ $(function () { - 'use strict'; + 'use strict' QUnit.module('scrollspy plugin') @@ -231,8 +231,8 @@ $(function () { .appendTo('#qunit-fixture') .bootstrapScrollspy({ offset: 0, target: '#navigation' }) - !function testActiveElements() { - if (++times > 3) return done() + function testActiveElements() { + if (++times > 3) { return done() } $content.one('scroll', function () { assert.ok($('#a-1').hasClass('active'), 'nav item for outer element has "active" class') @@ -241,7 +241,9 @@ $(function () { }) $content.scrollTop($content.scrollTop() + 10) - }() + } + + testActiveElements() }) QUnit.test('should clear selection if above the first section', function (assert) { @@ -285,6 +287,50 @@ $(function () { .scrollTop(201) }) + QUnit.test('should NOT clear selection if above the first section and first section is at the top', function (assert) { + assert.expect(4) + var done = assert.async() + + var sectionHTML = '<div id="header" style="height: 500px;"></div>' + + '<nav id="navigation" class="navbar">' + + '<ul class="nav navbar-nav">' + + '<li><a id="one-link" class="nav-link active" href="#one">One</a></li>' + + '<li><a id="two-link" class="nav-link" href="#two">Two</a></li>' + + '<li><a id="three-link" class="nav-link" href="#three">Three</a></li>' + + '</ul>' + + '</nav>' + $(sectionHTML).appendTo('#qunit-fixture') + + var negativeHeight = -10 + var startOfSectionTwo = 101 + + var scrollspyHTML = '<div id="content" style="height: 200px; overflow-y: auto;">' + + '<div id="one" style="height: 100px;"/>' + + '<div id="two" style="height: 100px;"/>' + + '<div id="three" style="height: 100px;"/>' + + '<div id="spacer" style="height: 100px;"/>' + + '</div>' + var $scrollspy = $(scrollspyHTML).appendTo('#qunit-fixture') + + $scrollspy + .bootstrapScrollspy({ + target: '#navigation', + offset: $scrollspy.position().top + }) + .one('scroll', function () { + assert.strictEqual($('.active').length, 1, '"active" class on only one element present') + assert.strictEqual($('.active').is('#two-link'), true, '"active" class on second section') + $scrollspy + .one('scroll', function () { + assert.strictEqual($('.active').length, 1, '"active" class on only one element present') + assert.strictEqual($('.active').is('#one-link'), true, '"active" class on first section') + done() + }) + .scrollTop(negativeHeight) + }) + .scrollTop(startOfSectionTwo) + }) + QUnit.test('should correctly select navigation element on backward scrolling when each target section height is 100%', function (assert) { assert.expect(5) var navbarHtml = @@ -399,8 +445,8 @@ $(function () { $navbar.appendTo('#qunit-fixture') $content.appendTo('#qunit-fixture') - if (type === 'js') $content.bootstrapScrollspy({ target: '.navbar', offset: 0, method: 'position' }) - else if (type === 'data') $(window).trigger('load') + if (type === 'js') { $content.bootstrapScrollspy({ target: '.navbar', offset: 0, method: 'position' }) } + else if (type === 'data') { $(window).trigger('load') } var $target = $('#div-' + type + 'm-2') var scrollspy = $content.data('bs.scrollspy') diff --git a/js/tests/unit/tab.js b/js/tests/unit/tab.js index 2e0143293..62eece896 100644 --- a/js/tests/unit/tab.js +++ b/js/tests/unit/tab.js @@ -1,5 +1,5 @@ $(function () { - 'use strict'; + 'use strict' QUnit.module('tabs plugin') @@ -76,6 +76,22 @@ $(function () { assert.strictEqual($('#qunit-fixture').find('.active').attr('id'), 'home') }) + QUnit.test('should activate element by tab id in ordered list', function (assert) { + assert.expect(2) + var pillsHTML = '<ol class="pills">' + + '<li><a href="#home">Home</a></li>' + + '<li><a href="#profile">Profile</a></li>' + + '</ol>' + + $('<ol><li id="home"/><li id="profile"/></ol>').appendTo('#qunit-fixture') + + $(pillsHTML).find('li:last a').bootstrapTab('show') + assert.strictEqual($('#qunit-fixture').find('.active').attr('id'), 'profile') + + $(pillsHTML).find('li:first a').bootstrapTab('show') + assert.strictEqual($('#qunit-fixture').find('.active').attr('id'), 'home') + }) + QUnit.test('should not fire shown when show is prevented', function (assert) { assert.expect(1) var done = assert.async() @@ -92,6 +108,44 @@ $(function () { .bootstrapTab('show') }) + QUnit.test('should not fire shown when tab is already active', function (assert) { + assert.expect(0) + var tabsHTML = '<ul class="nav nav-tabs" role="tablist">' + + '<li class="nav-item"><a href="#home" class="nav-link active" role="tab">Home</a></li>' + + '<li class="nav-item"><a href="#profile" class="nav-link" role="tab">Profile</a></li>' + + '</ul>' + + '<div class="tab-content">' + + '<div class="tab-pane active" id="home" role="tabpanel"></div>' + + '<div class="tab-pane" id="profile" role="tabpanel"></div>' + + '</div>' + + $(tabsHTML) + .find('a.active') + .on('shown.bs.tab', function () { + assert.ok(true, 'shown event fired') + }) + .bootstrapTab('show') + }) + + QUnit.test('should not fire shown when tab is disabled', function (assert) { + assert.expect(0) + var tabsHTML = '<ul class="nav nav-tabs" role="tablist">' + + '<li class="nav-item"><a href="#home" class="nav-link active" role="tab">Home</a></li>' + + '<li class="nav-item"><a href="#profile" class="nav-link disabled" role="tab">Profile</a></li>' + + '</ul>' + + '<div class="tab-content">' + + '<div class="tab-pane active" id="home" role="tabpanel"></div>' + + '<div class="tab-pane" id="profile" role="tabpanel"></div>' + + '</div>' + + $(tabsHTML) + .find('a.disabled') + .on('shown.bs.tab', function () { + assert.ok(true, 'shown event fired') + }) + .bootstrapTab('show') + }) + QUnit.test('show and shown events should reference correct relatedTarget', function (assert) { assert.expect(2) var done = assert.async() @@ -225,4 +279,36 @@ $(function () { assert.strictEqual($tabs.find('a:not(.active)').attr('aria-expanded'), 'false', 'after second show event, hidden tab has aria-expanded = false') }) + QUnit.test('selected tab should deactivate previous selected tab', function (assert) { + assert.expect(2) + var tabsHTML = '<ul class="nav nav-tabs">' + + '<li class="nav-item"><a class="nav-link active" href="#home" data-toggle="tab">Home</a></li>' + + '<li class="nav-item"><a class="nav-link" href="#profile" data-toggle="tab">Profile</a></li>' + + '</ul>' + var $tabs = $(tabsHTML).appendTo('#qunit-fixture') + + $tabs.find('li:last a').trigger('click') + assert.notOk($tabs.find('li:first a').hasClass('active')) + assert.ok($tabs.find('li:last a').hasClass('active')) + }) + + QUnit.test('selected tab should deactivate previous selected link in dropdown', function (assert) { + assert.expect(3) + var tabsHTML = '<ul class="nav nav-tabs">' + + '<li class="nav-item"><a class="nav-link" href="#home" data-toggle="tab">Home</a></li>' + + '<li class="nav-item"><a class="nav-link" href="#profile" data-toggle="tab">Profile</a></li>' + + '<li class="nav-item dropdown"><a class="nav-link dropdown-toggle active" data-toggle="dropdown" href="#">Dropdown</a>' + + '<div class="dropdown-menu">' + + '<a class="dropdown-item active" href="#dropdown1" id="dropdown1-tab" data-toggle="tab">@fat</a>' + + '<a class="dropdown-item" href="#dropdown2" id="dropdown2-tab" data-toggle="tab">@mdo</a>' + + '</div>' + + '</li>' + + '</ul>' + var $tabs = $(tabsHTML).appendTo('#qunit-fixture') + + $tabs.find('li:first > a').trigger('click') + assert.ok($tabs.find('li:first a').hasClass('active')) + assert.notOk($tabs.find('li:last > a').hasClass('active')) + assert.notOk($tabs.find('li:last > .dropdown-menu > a:first').hasClass('active')) + }) }) diff --git a/js/tests/unit/tooltip.js b/js/tests/unit/tooltip.js index 6cf870551..7ff967fab 100644 --- a/js/tests/unit/tooltip.js +++ b/js/tests/unit/tooltip.js @@ -1,5 +1,5 @@ $(function () { - 'use strict'; + 'use strict' QUnit.module('tooltip plugin') @@ -111,7 +111,7 @@ $(function () { assert .ok($('.tooltip') - .is('.fade.bs-tether-element-attached-top.bs-tether-element-attached-center.in'), 'has correct classes applied') + .is('.fade.bs-tether-element-attached-top.bs-tether-element-attached-center.show'), 'has correct classes applied') $tooltip.bootstrapTooltip('hide') @@ -185,6 +185,19 @@ $(function () { .bootstrapTooltip('show') }) + QUnit.test('should throw an error when show is called on hidden elements', function (assert) { + assert.expect(1) + var done = assert.async() + + try { + $('<div title="tooltip title" style="display: none"/>').bootstrapTooltip('show') + } + catch (err) { + assert.strictEqual(err.message, 'Please use show on visible elements') + done() + } + }) + QUnit.test('should fire inserted event', function (assert) { assert.expect(2) var done = assert.async() @@ -293,7 +306,7 @@ $(function () { $tooltip.bootstrapTooltip('show') $tooltip.bootstrapTooltip('dispose') - assert.ok(!$tooltip.hasClass('in'), 'tooltip is hidden') + assert.ok(!$tooltip.hasClass('show'), 'tooltip is hidden') assert.ok(!$._data($tooltip[0], 'bs.tooltip'), 'tooltip does not have data') assert.strictEqual($._data($tooltip[0], 'events').click[0].namespace, 'foo', 'tooltip still has click.foo') assert.ok(!$._data($tooltip[0], 'events').mouseover && !$._data($tooltip[0], 'events').mouseout, 'tooltip does not have hover events') @@ -322,7 +335,7 @@ $(function () { .bootstrapTooltip({ trigger: 'manual' }) .bootstrapTooltip('toggle') - assert.ok($('.tooltip').is('.fade.in'), 'tooltip is faded in') + assert.ok($('.tooltip').is('.fade.show'), 'tooltip is faded active') }) QUnit.test('should hide previously shown tooltip when toggle is called on tooltip', function (assert) { @@ -333,7 +346,7 @@ $(function () { .bootstrapTooltip('show') $('.tooltip').bootstrapTooltip('toggle') - assert.ok($('.tooltip').not('.fade.in'), 'tooltip was faded out') + assert.ok($('.tooltip').not('.fade.show'), 'tooltip was faded out') }) QUnit.test('should place tooltips inside body when container is body', function (assert) { @@ -369,7 +382,7 @@ $(function () { var $tooltip = $($target.data('bs.tooltip').tip) // this is some dumb hack stuff because sub pixels in firefox - var top = Math.round($target.offset().top + ($target[0].offsetHeight / 2) - ($tooltip[0].offsetHeight / 2)) + var top = Math.round($target.offset().top + $target[0].offsetHeight / 2 - $tooltip[0].offsetHeight / 2) var top2 = Math.round($tooltip.offset().top) var topDiff = top - top2 assert.ok(topDiff <= 1 && topDiff >= -1) @@ -489,11 +502,11 @@ $(function () { .bootstrapTooltip({ delay: 150 }) setTimeout(function () { - assert.ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip is not faded in') + assert.ok(!$('.tooltip').is('.fade.show'), '100ms: tooltip is not faded active') }, 100) setTimeout(function () { - assert.ok($('.tooltip').is('.fade.in'), '200ms: tooltip is faded in') + assert.ok($('.tooltip').is('.fade.show'), '200ms: tooltip is faded active') done() }, 200) @@ -509,12 +522,12 @@ $(function () { .bootstrapTooltip({ delay: 150 }) setTimeout(function () { - assert.ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in') + assert.ok(!$('.tooltip').is('.fade.show'), '100ms: tooltip not faded active') $tooltip.trigger('mouseout') }, 100) setTimeout(function () { - assert.ok(!$('.tooltip').is('.fade.in'), '200ms: tooltip not faded in') + assert.ok(!$('.tooltip').is('.fade.show'), '200ms: tooltip not faded active') done() }, 200) @@ -527,19 +540,19 @@ $(function () { var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') .appendTo('#qunit-fixture') - .bootstrapTooltip({ delay: { show: 0, hide: 150 }}) + .bootstrapTooltip({ delay: { show: 0, hide: 150 } }) setTimeout(function () { - assert.ok($('.tooltip').is('.fade.in'), '1ms: tooltip faded in') + assert.ok($('.tooltip').is('.fade.show'), '1ms: tooltip faded active') $tooltip.trigger('mouseout') setTimeout(function () { - assert.ok($('.tooltip').is('.fade.in'), '100ms: tooltip still faded in') + assert.ok($('.tooltip').is('.fade.show'), '100ms: tooltip still faded active') $tooltip.trigger('mouseenter') }, 100) setTimeout(function () { - assert.ok($('.tooltip').is('.fade.in'), '200ms: tooltip still faded in') + assert.ok($('.tooltip').is('.fade.show'), '200ms: tooltip still faded active') done() }, 200) }, 0) @@ -556,12 +569,12 @@ $(function () { .bootstrapTooltip({ delay: 150 }) setTimeout(function () { - assert.ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in') + assert.ok(!$('.tooltip').is('.fade.show'), '100ms: tooltip not faded active') $tooltip.trigger('mouseout') }, 100) setTimeout(function () { - assert.ok(!$('.tooltip').is('.fade.in'), '200ms: tooltip not faded in') + assert.ok(!$('.tooltip').is('.fade.show'), '200ms: tooltip not faded active') done() }, 200) @@ -574,15 +587,15 @@ $(function () { var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') .appendTo('#qunit-fixture') - .bootstrapTooltip({ delay: { show: 150, hide: 0 }}) + .bootstrapTooltip({ delay: { show: 150, hide: 0 } }) setTimeout(function () { - assert.ok(!$('.tooltip').is('.fade.in'), '100ms: tooltip not faded in') + assert.ok(!$('.tooltip').is('.fade.show'), '100ms: tooltip not faded active') $tooltip.trigger('mouseout') }, 100) setTimeout(function () { - assert.ok(!$('.tooltip').is('.fade.in'), '250ms: tooltip not faded in') + assert.ok(!$('.tooltip').is('.fade.show'), '250ms: tooltip not faded active') done() }, 250) @@ -595,19 +608,19 @@ $(function () { var $tooltip = $('<a href="#" rel="tooltip" title="Another tooltip"/>') .appendTo('#qunit-fixture') - .bootstrapTooltip({ delay: { show: 0, hide: 150 }}) + .bootstrapTooltip({ delay: { show: 0, hide: 150 } }) setTimeout(function () { - assert.ok($($tooltip.data('bs.tooltip').tip).is('.fade.in'), '1ms: tooltip faded in') + assert.ok($($tooltip.data('bs.tooltip').tip).is('.fade.show'), '1ms: tooltip faded active') $tooltip.trigger('mouseout') setTimeout(function () { - assert.ok($($tooltip.data('bs.tooltip').tip).is('.fade.in'), '100ms: tooltip still faded in') + assert.ok($($tooltip.data('bs.tooltip').tip).is('.fade.show'), '100ms: tooltip still faded active') }, 100) setTimeout(function () { - assert.ok(!$($tooltip.data('bs.tooltip').tip).is('.in'), '200ms: tooltip removed') + assert.ok(!$($tooltip.data('bs.tooltip').tip).is('.show'), '200ms: tooltip removed') done() }, 200) @@ -710,10 +723,10 @@ $(function () { $('#tt-outer').trigger('mouseleave') assert.strictEqual(currentUid, $('#tt-content').text()) - assert.ok(obj._hoverState == 'out', 'the tooltip hoverState should be set to "out"') + assert.ok(obj._hoverState === 'out', 'the tooltip hoverState should be set to "out"') $('#tt-outer').trigger('mouseenter') - assert.ok(obj._hoverState == 'in', 'the tooltip hoverState should be set to "in"') + assert.ok(obj._hoverState === 'show', 'the tooltip hoverState should be set to "show"') assert.strictEqual(currentUid, $('#tt-content').text()) }) @@ -775,7 +788,7 @@ $(function () { var tooltip = $el.data('bs.tooltip') var $tooltip = $(tooltip.getTipElement()) - function showingTooltip() { return $tooltip.hasClass('in') || tooltip._hoverState == 'in' } + function showingTooltip() { return $tooltip.hasClass('show') || tooltip._hoverState === 'show' } var tests = [ ['mouseenter', 'mouseleave'], @@ -799,10 +812,31 @@ $(function () { $.each(tests, function (idx, triggers) { for (var i = 0, len = triggers.length; i < len; i++) { - $el.trigger(triggers[i]); - assert.equal(i < (len - 1), showingTooltip()) + $el.trigger(triggers[i]) + assert.equal(i < len - 1, showingTooltip()) } }) }) + QUnit.test('should show on first trigger after hide', function (assert) { + assert.expect(3) + var $el = $('<a href="#" rel="tooltip" title="Test tooltip"/>') + .appendTo('#qunit-fixture') + .bootstrapTooltip({ trigger: 'click hover focus', animation: false }) + + var tooltip = $el.data('bs.tooltip') + var $tooltip = $(tooltip.getTipElement()) + + function showingTooltip() { return $tooltip.hasClass('show') || tooltip._hoverState === 'show' } + + $el.trigger('click') + assert.ok(showingTooltip(), 'tooltip is faded in') + + $el.bootstrapTooltip('hide') + assert.ok(!showingTooltip(), 'tooltip was faded out') + + $el.trigger('click') + assert.ok(showingTooltip(), 'tooltip is faded in again') + }) + }) diff --git a/js/tests/visual/alert.html b/js/tests/visual/alert.html index 15fb3091a..f99c2d242 100644 --- a/js/tests/visual/alert.html +++ b/js/tests/visual/alert.html @@ -1,39 +1,52 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Alert</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> -</head> -<body> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Alert</title> + </head> + <body> + <div class="container"> + <h1>Alert <small>Bootstrap Visual Test</small></h1> -<div class="container"> + <div class="alert alert-warning alert-dismissible fade show" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <strong>Holy guacamole!</strong> You should check in on some of those fields below. + </div> - <h1>Alert <small>Bootstrap Visual Test</small></h1> + <div class="alert alert-danger alert-dismissible fade show" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <p> + <strong>Oh snap!</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again. + </p> + <p> + <button type="button" class="btn btn-danger">Danger</button> + <button type="button" class="btn btn-secondary">Secondary</button> + </p> + </div> - <div class="alert alert-warning fade in"> - <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> - <strong>Holy guacamole!</strong> Best check yo self, you're not looking too good. - </div> + <div class="alert alert-danger alert-dismissible fade show" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <p> + <strong>Oh snap!</strong> <a href="#" class="alert-link">Change a few things up</a> and try submitting again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum. + </p> + <p> + <button type="button" class="btn btn-danger">Take this action</button> + <button type="button" class="btn btn-primary">Or do this</button> + </p> + </div> + </div> - <div class="alert alert-danger fade in"> - <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> - <h4>Oh snap! You got an error!</h4> - <p>Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.</p> - <p> - <button type="button" class="btn btn-danger">Take this action</button> - <button type="button" class="btn btn-default">Or do this</button> - </p> - </div> - -</div> - -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../../dist/util.js"></script> -<script src="../../dist/alert.js"></script> - -</body> + <script src="../vendor/jquery.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/alert.js"></script> + </body> </html> diff --git a/js/tests/visual/button.html b/js/tests/visual/button.html index 570c9addd..e2364d781 100644 --- a/js/tests/visual/button.html +++ b/js/tests/visual/button.html @@ -1,66 +1,52 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Button</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> -</head> -<body> - -<div class="container"> - - <h1>Button <small>Bootstrap Visual Test</small></h1> - - <button type="button" class="btn btn-primary" data-toggle="button">Single toggle</button> - - <p>For checkboxes and radio buttons, ensure that keyboard behavior is functioning correctly.</p> - <p>Navigate to the checkboxes with the keyboard (generally, using <kbd>TAB</kbd> / <kbd>SHIFT + TAB</kbd>), and ensure that <kbd>SPACE</kbd> toggles the currently focused checkbox. Click on one of the checkboxes using the mouse, ensure that focus was correctly set on the actual checkbox, and that <kbd>SPACE</kbd> toggles the checkbox again.</p> - - <div class="btn-group" data-toggle="buttons"> - <label class="btn btn-primary"> - <input type="checkbox"> checkbox 1 - </label> - <label class="btn btn-primary"> - <input type="checkbox"> checkbox 2 - </label> - <label class="btn btn-primary"> - <input type="checkbox"> checkbox 3 - </label> - </div> - - <p>Navigate to the radio button group with the keyboard (generally, using <kbd>TAB</kbd> / <kbd>SHIFT + TAB</kbd>). If no radio button was initially set to be selected, the first/last radio button should receive focus (depending on whether you navigated "forward" to the group with <kbd>TAB</kbd> or "backwards" using <kbd>SHIFT + TAB</kbd>). If a radio button was already selected, navigating with the keyboard should set focus to that particular radio button. Only one radio button in a group should receive focus at any given time. Ensure that the selected radio button can be changed by using the <kbd>←</kbd> and <kbd>→</kbd> arrow keys. Click on one of the radio buttons with the mouse, ensure that focus was correctly set on the actual radio button, and that <kbd>←</kbd> and <kbd>→</kbd> change the selected radio button again.</p> - - <div class="btn-group" data-toggle="buttons"> - <label class="btn btn-primary"> - <input type="radio" name="options" id="option1"> Radio 1 - </label> - <label class="btn btn-primary"> - <input type="radio" name="options" id="option2"> Radio 2 - </label> - <label class="btn btn-primary"> - <input type="radio" name="options" id="option3"> Radio 3 - </label> - </div> - -</div> - -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../../dist/util.js"></script> -<script src="../../dist/button.js"></script> - -<!-- JavaScript Test --> -<script> -$(function () { - $('.js-loading-button').on('click', function () { - var btn = $(this).button('loading') - setTimeout(function (){ - btn.button('reset') - }, 3000) - }) -}) -</script> -</body> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Button</title> + </head> + <body> + <div class="container"> + <h1>Button <small>Bootstrap Visual Test</small></h1> + + <button type="button" class="btn btn-primary" data-toggle="button" aria-pressed="false" autocomplete="off"> + Single toggle + </button> + + <p>For checkboxes and radio buttons, ensure that keyboard behavior is functioning correctly.</p> + <p>Navigate to the checkboxes with the keyboard (generally, using <kbd>TAB</kbd> / <kbd>SHIFT + TAB</kbd>), and ensure that <kbd>SPACE</kbd> toggles the currently focused checkbox. Click on one of the checkboxes using the mouse, ensure that focus was correctly set on the actual checkbox, and that <kbd>SPACE</kbd> toggles the checkbox again.</p> + + <div class="btn-group" data-toggle="buttons"> + <label class="btn btn-primary active"> + <input type="checkbox" checked autocomplete="off"> Checkbox 1 (pre-checked) + </label> + <label class="btn btn-primary"> + <input type="checkbox" autocomplete="off"> Checkbox 2 + </label> + <label class="btn btn-primary"> + <input type="checkbox" autocomplete="off"> Checkbox 3 + </label> + </div> + + <p>Navigate to the radio button group with the keyboard (generally, using <kbd>TAB</kbd> / <kbd>SHIFT + TAB</kbd>). If no radio button was initially set to be selected, the first/last radio button should receive focus (depending on whether you navigated "forward" to the group with <kbd>TAB</kbd> or "backwards" using <kbd>SHIFT + TAB</kbd>). If a radio button was already selected, navigating with the keyboard should set focus to that particular radio button. Only one radio button in a group should receive focus at any given time. Ensure that the selected radio button can be changed by using the <kbd>←</kbd> and <kbd>→</kbd> arrow keys. Click on one of the radio buttons with the mouse, ensure that focus was correctly set on the actual radio button, and that <kbd>←</kbd> and <kbd>→</kbd> change the selected radio button again.</p> + + <div class="btn-group" data-toggle="buttons"> + <label class="btn btn-primary active"> + <input type="radio" name="options" id="option1" autocomplete="off" checked> Radio 1 (preselected) + </label> + <label class="btn btn-primary"> + <input type="radio" name="options" id="option2" autocomplete="off"> Radio 2 + </label> + <label class="btn btn-primary"> + <input type="radio" name="options" id="option3" autocomplete="off"> Radio 3 + </label> + </div> + </div> + + <script src="../vendor/jquery.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/button.js"></script> + </body> </html> diff --git a/js/tests/visual/carousel.html b/js/tests/visual/carousel.html index 859ff7504..b26fb4a0d 100644 --- a/js/tests/visual/carousel.html +++ b/js/tests/visual/carousel.html @@ -1,57 +1,77 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Carousel</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> -</head> -<body> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Carousel</title> + </head> + <body> + <div class="container"> + <h1>Carousel <small>Bootstrap Visual Test</small></h1> -<div class="container"> + <p>Also, the carousel shouldn't slide when its window/tab is hidden. Check the console log.</p> - <h1>Carousel <small>Bootstrap Visual Test</small></h1> - <p>Also, the carousel shouldn't slide when its window/tab is hidden. Check the console log.</p> - <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> - <ol class="carousel-indicators"> - <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li> - <li data-target="#carousel-example-generic" data-slide-to="1" class=""></li> - <li data-target="#carousel-example-generic" data-slide-to="2" class=""></li> - </ol> - <div class="carousel-inner"> - <div class="carousel-item active"> - <img alt="First slide" src="https://37.media.tumblr.com/tumblr_m8tay0JcfG1qa42jro1_1280.jpg"> - </div> - <div class="carousel-item"> - <img alt="Second slide" src="https://37.media.tumblr.com/tumblr_m8tazfiVYJ1qa42jro1_1280.jpg"> - </div> - <div class="carousel-item"> - <img alt="Third slide" src="https://38.media.tumblr.com/tumblr_m8tb2rVsD31qa42jro1_1280.jpg"> + <div id="carousel-example-generic" class="carousel slide" data-ride="carousel"> + <ol class="carousel-indicators"> + <li data-target="#carousel-example-generic" data-slide-to="0" class="active"></li> + <li data-target="#carousel-example-generic" data-slide-to="1"></li> + <li data-target="#carousel-example-generic" data-slide-to="2"></li> + </ol> + <div class="carousel-inner" role="listbox"> + <div class="carousel-item active"> + <img src="https://37.media.tumblr.com/tumblr_m8tay0JcfG1qa42jro1_1280.jpg" alt="First slide"> + </div> + <div class="carousel-item"> + <img src="https://37.media.tumblr.com/tumblr_m8tazfiVYJ1qa42jro1_1280.jpg" alt="Second slide"> + </div> + <div class="carousel-item"> + <img src="https://38.media.tumblr.com/tumblr_m8tb2rVsD31qa42jro1_1280.jpg" alt="Third slide"> + </div> + </div> + <a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev"> + <span class="icon-prev" aria-hidden="true"></span> + <span class="sr-only">Previous</span> + </a> + <a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next"> + <span class="icon-next" aria-hidden="true"></span> + <span class="sr-only">Next</span> + </a> </div> </div> - <a class="left carousel-control" href="#carousel-example-generic" data-slide="prev"> - <span class="glyphicon glyphicon-chevron-left"></span> - </a> - <a class="right carousel-control" href="#carousel-example-generic" data-slide="next"> - <span class="glyphicon glyphicon-chevron-right"></span> - </a> - </div> -</div> + <script src="../vendor/jquery.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/carousel.js"></script> -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../../dist/util.js"></script> -<script src="../../dist/carousel.js"></script> -<script> - $(function () { - // Test to show that the carousel doesn't slide when the current tab isn't visible - $('#carousel-example-generic').on('slid.bs.carousel', function (event) { - console.log('slid at ', event.timeStamp); - }) - }); -</script> + <script> + // Should throw an error because carousel is in transition + function testCarouselTransitionError() { + var err = false + var $carousel = $('#carousel-example-generic') + $carousel.on('slid.bs.carousel', function () { + $carousel.off('slid.bs.carousel') + if (!err) { + alert('No error thrown for : testCarouselTransitionError') + } + }) + try { + $carousel.carousel('next').carousel('prev') + } + catch (e) { + err = true + console.error(e.message) + } + } -</body> + $(function () { + // Test to show that the carousel doesn't slide when the current tab isn't visible + $('#carousel-example-generic').on('slid.bs.carousel', function (event) { + console.log('slid at ', event.timeStamp) + }) + testCarouselTransitionError() + }) + </script> + </body> </html> diff --git a/js/tests/visual/collapse.html b/js/tests/visual/collapse.html index ec7a6f29a..47ac06fd2 100644 --- a/js/tests/visual/collapse.html +++ b/js/tests/visual/collapse.html @@ -1,69 +1,90 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Collapse</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> -</head> -<body> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Collapse</title> + </head> + <body> + <div class="container"> + <h1>Collapse <small>Bootstrap Visual Test</small></h1> -<div class="container"> - - <h1>Collapse <small>Bootstrap Visual Test</small></h1> + <div id="accordion" role="tablist" aria-multiselectable="true"> + <div class="card"> + <div class="card-header" role="tab" id="headingOne"> + <h5 class="mb-0"> + <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> + Collapsible Group Item #1 + </a> + </h5> + </div> - <div id="accordion"> - <div class="card"> - <div class="card-header"> - <h5 class="mb-0"> - <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne"> - Collapsible Group Item #1 - </a> - </h5> - </div> - <div id="collapseOne" class="collapse in"> - <div class="card-block"> - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + <div id="collapseOne" class="collapse show" role="tabpanel" aria-labelledby="headingOne"> + <div class="card-block"> + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + </div> </div> - </div> - </div> - <div class="card"> - <div class="card-header"> - <h5 class="mb-0"> - <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo"> - Collapsible Group Item #2 - </a> - </h5> - </div> - <div id="collapseTwo" class="collapse"> - <div class="card-block"> - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + </div> + <div class="card"> + <div class="card-header" role="tab" id="headingTwo"> + <h5 class="mb-0"> + <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> + Collapsible Group Item #2 + </a> + </h5> </div> - </div> - </div> - <div class="card"> - <div class="card-header"> - <h5 class="mb-0"> - <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseThree"> - Collapsible Group Item #3 - </a> - </h5> - </div> - <div id="collapseThree" class="collapse"> - <div class="card-block"> - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + <div id="collapseTwo" class="collapse" role="tabpanel" aria-labelledby="headingTwo"> + <div class="card-block"> + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + </div> + </div> + </div> + <div class="card"> + <div class="card-header" role="tab" id="headingThree"> + <h5 class="mb-0"> + <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> + Collapsible Group Item #3 + </a> + </h5> + </div> + <div id="collapseThree" class="collapse" role="tabpanel" aria-labelledby="headingThree"> + <div class="card-block"> + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + </div> </div> + </div> </div> </div> - </div> -</div> + <script src="../vendor/jquery.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/collapse.js"></script> + <script> + // JavaScript Test + $(function () { + testCollapseTransitionError() + }); -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../../dist/util.js"></script> -<script src="../../dist/collapse.js"></script> + // Should throw an error because carousel is in transition + function testCollapseTransitionError() { + var err = false + $('#collapseOne').on('hidden.bs.collapse', function (e) { + $(this).off('hidden.bs.collapse') + if (!err) { + alert('No error thrown for : testCollapseTransitionError') + } + }) -</body> + try { + $('#collapseOne').collapse('hide').collapse('show') + } + catch (e) { + err = true + console.error(e.message) + } + } + </script> + </body> </html> diff --git a/js/tests/visual/dropdown.html b/js/tests/visual/dropdown.html index 7dce87bd1..4bea32c14 100644 --- a/js/tests/visual/dropdown.html +++ b/js/tests/visual/dropdown.html @@ -1,107 +1,66 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Dropdown</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> -</head> -<body> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Dropdown</title> + </head> + <body> + <div class="container"> + <h1>Dropdown <small>Bootstrap Visual Test</small></h1> -<div class="container"> + <nav class="navbar navbar-light bg-faded"> + <button class="navbar-toggler hidden-lg-up" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"></button> + <div class="collapse navbar-toggleable-md" id="navbarResponsive"> + <a class="navbar-brand" href="#">Navbar</a> + <ul class="nav navbar-nav"> + <li class="nav-item active"> + <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu" aria-labelledby="dropdown"> + <a class="dropdown-item" href="#">Action</a> + <a class="dropdown-item" href="#">Another action</a> + <a class="dropdown-item" href="#">Something else here</a> + </div> + </li> + </ul> + </div> + </nav> - <h1>Dropdown <small>Bootstrap Visual Test</small></h1> - - <nav id="navbar-example" class="navbar navbar-light bg-faded"> - <button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar2"> - ☰ - </button> - - <div class="collapse navbar-toggleable-xs" id="exCollapsingNavbar2"> - - <ul class="nav navbar-nav float-xs-left"> - - <li class="dropdown nav-item"> - <a id="drop1" href="#" role="button" class="dropdown-toggle nav-link" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown - </a> - <div class="dropdown-menu" aria-labelledby="drop1"> - <a class="dropdown-item" href="https://twitter.com/fat">Action</a> - <a class="dropdown-item" href="https://twitter.com/fat">Another action</a> - <a class="dropdown-item" href="https://twitter.com/fat">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="https://twitter.com/fat">Separated link</a> - </div> + <ul class="nav nav-pills mt-3"> + <li class="nav-item"> + <a class="nav-link active" href="#">Active</a> </li> - - <li class="dropdown nav-item"> - <a href="#" id="drop2" role="button" class="dropdown-toggle nav-link" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown 2 - </a> - <div class="dropdown-menu" aria-labelledby="drop2"> - <a class="dropdown-item" href="https://twitter.com/fat">Action</a> - <a class="dropdown-item" href="https://twitter.com/fat">Another action</a> - <a class="dropdown-item" href="https://twitter.com/fat">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="https://twitter.com/fat">Separated link</a> - </div> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> </li> - - </ul> - - <ul class="nav navbar-nav float-xs-right"> - <li id="fat-menu" class="dropdown nav-item"> - <a href="#" id="drop3" role="button" class="dropdown-toggle nav-link" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> - Dropdown 3 - </a> - <div class="dropdown-menu" aria-labelledby="drop3"> - <a class="dropdown-item" href="https://twitter.com/fat">Action</a> - <a class="dropdown-item" href="https://twitter.com/fat">Another action</a> - <a class="dropdown-item" href="https://twitter.com/fat">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="https://twitter.com/fat">Separated link</a> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="http://example.com" id="dropdown2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu" aria-labelledby="dropdown2"> + <a class="dropdown-item" href="#">Action</a> + <a class="dropdown-item" href="#">Another action</a> + <a class="dropdown-item" href="#">Something else here</a> </div> </li> </ul> </div> - </nav> - - <ul class="nav nav-pills mt-3"> - <li class="active nav-item"><a href="#" class="nav-link">Regular link</a></li> - <li class="dropdown nav-item"> - <a id="drop4" class="nav-link" role="button" data-toggle="dropdown" href="#" aria-haspopup="true" aria-expanded="false"> - Dropdown - </a> - <div id="menu1" class="dropdown-menu" aria-labelledby="drop4"> - <a class="dropdown-item" href="https://twitter.com/fat">Action</a> - <a class="dropdown-item" href="https://twitter.com/fat">Another action</a> - <a class="dropdown-item" href="https://twitter.com/fat">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="https://twitter.com/fat">Separated link</a> - </div> - </li> - <li class="dropdown nav-item"> - <a id="drop5" class="nav-link" role="button" data-toggle="dropdown" href="#" aria-haspopup="true" aria-expanded="false"> - Dropdown 2 - </a> - <div id="menu2" class="dropdown-menu" aria-labelledby="drop5"> - <a class="dropdown-item" href="https://twitter.com/fat">Action</a> - <a class="dropdown-item" href="https://twitter.com/fat">Another action</a> - <a class="dropdown-item" href="https://twitter.com/fat">Something else here</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="https://twitter.com/fat">Separated link</a> - </div> - </li> - </ul> - -</div> - -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../../dist/util.js"></script> -<script src="../../dist/dropdown.js"></script> -<script src="../../dist/collapse.js"></script> -</body> + <script src="../vendor/jquery.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/dropdown.js"></script> + <script src="../../dist/collapse.js"></script> + </body> </html> diff --git a/js/tests/visual/modal.html b/js/tests/visual/modal.html index a9e2c2440..361bf6b87 100644 --- a/js/tests/visual/modal.html +++ b/js/tests/visual/modal.html @@ -1,201 +1,227 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Modal</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> - <style> - #tall { - height: 1500px; - width: 100px; - background-color: black; - color: white; - } - </style> -</head> -<body> - -<nav class="navbar navbar-dark bg-inverse navbar-static-top"> - <button class="navbar-toggler hidden-sm-up" type="button" data-toggle="collapse" data-target="#exCollapsingNavbar2"> - ☰ - </button> - <div class="collapse navbar-toggleable-xs" id="exCollapsingNavbar2"> - <a class="navbar-brand" href="#">This shouldn't jump!</a> - <ul class="nav navbar-nav"> - <li class="nav-item active"> - <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Features</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">Pricing</a> - </li> - <li class="nav-item"> - <a class="nav-link" href="#">About</a> - </li> - </ul> - </div> -</nav> - -<div class="container mt-3"> - - <h1>Modal <small>Bootstrap Visual Test</small></h1> - - <div id="myModal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"> - <div class="modal-dialog" role="document"> - <div class="modal-content"> - - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> - <h4 class="modal-title" id="myModalLabel">Modal Heading</h4> - </div> - <div class="modal-body"> - <h4>Text in a modal</h4> - <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p> - - <h4>Popover in a modal</h4> - <p>This <a href="#" role="button" class="btn btn-primary js-popover" title="A Title" data-content="And here's some amazing content. It's very engaging. right?" data-placement="left">button</a> should trigger a popover on click.</p> - - <h4>Tooltips in a modal</h4> - <p><a href="#" class="js-tooltip" title="Tooltip">This link</a> and <a href="#" class="js-tooltip" title="Tooltip">that link</a> should have tooltips on hover.</p> - - <div id="accordion" role="tablist" aria-multiselectable="true"> - <div class="card"> - <div class="card-header" role="tab" id="headingOne"> - <h5 class="mb-0"> - <a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> - Collapsible Group Item #1 - </a> - </h5> - </div> - <div id="collapseOne" class="collapse in" role="tabpanel" aria-labelledby="headingOne"> - <div class="card-block"> - Lorem ipsum - </div> - </div> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Modal</title> + <style> + #tall { + height: 1500px; + width: 100px; + } + </style> + </head> + <body> + <nav class="navbar navbar-full navbar-dark bg-inverse"> + <button class="navbar-toggler hidden-lg-up" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation"></button> + <div class="collapse navbar-toggleable-md" id="navbarResponsive"> + <a class="navbar-brand" href="#">This shouldn't jump!</a> + <ul class="nav navbar-nav"> + <li class="nav-item active"> + <a class="nav-link" href="#">Home <span class="sr-only">(current)</span></a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#">Link</a> + </li> + </ul> + </div> + </nav> + + <div class="container mt-3"> + <h1>Modal <small>Bootstrap Visual Test</small></h1> + + <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <h4 class="modal-title" id="myModalLabel">Modal title</h4> </div> - <div class="card"> - <div class="card-header" role="tab" id="headingTwo"> - <h5 class="mb-0"> - <a class="collapsed" role="button" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> - Collapsible Group Item #2 - </a> - </h5> - </div> - <div id="collapseTwo" class="collapse" role="tabpanel" aria-labelledby="headingTwo"> - <div class="card-block"> - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. - Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + <div class="modal-body"> + <h4>Text in a modal</h4> + <p>Duis mollis, est non commodo luctus, nisi erat porttitor ligula.</p> + + <h4>Popover in a modal</h4> + <p>This <button type="button" class="btn btn-primary" data-toggle="popover" data-placement="left" title="Popover title" data-content="And here's some amazing content. It's very engaging. Right?">button</button> should trigger a popover on click.</p> + + + <h4>Tooltips in a modal</h4> + <p><a href="#" data-toggle="tooltip" data-placement="top" title="Tooltip on top">This link</a> and <a href="#" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">that link</a> should have tooltips on hover.</p> + + <div id="accordion" role="tablist" aria-multiselectable="true"> + <div class="card"> + <div class="card-header" role="tab" id="headingOne"> + <h5 class="mb-0"> + <a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne"> + Collapsible Group Item #1 + </a> + </h5> + </div> + + <div id="collapseOne" class="collapse show" role="tabpanel" aria-labelledby="headingOne"> + <div class="card-block"> + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + </div> + </div> + </div> + <div class="card"> + <div class="card-header" role="tab" id="headingTwo"> + <h5 class="mb-0"> + <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo"> + Collapsible Group Item #2 + </a> + </h5> + </div> + <div id="collapseTwo" class="collapse" role="tabpanel" aria-labelledby="headingTwo"> + <div class="card-block"> + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + </div> + </div> + </div> + <div class="card"> + <div class="card-header" role="tab" id="headingThree"> + <h5 class="mb-0"> + <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree"> + Collapsible Group Item #3 + </a> + </h5> + </div> + <div id="collapseThree" class="collapse" role="tabpanel" aria-labelledby="headingThree"> + <div class="card-block"> + Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid. 3 wolf moon officia aute, non cupidatat skateboard dolor brunch. Food truck quinoa nesciunt laborum eiusmod. Brunch 3 wolf moon tempor, sunt aliqua put a bird on it squid single-origin coffee nulla assumenda shoreditch et. Nihil anim keffiyeh helvetica, craft beer labore wes anderson cred nesciunt sapiente ea proident. Ad vegan excepteur butcher vice lomo. Leggings occaecat craft beer farm-to-table, raw denim aesthetic synth nesciunt you probably haven't heard of them accusamus labore sustainable VHS. + </div> + </div> </div> </div> + + <hr> + + <h4>Overflowing text to show scroll behavior</h4> + <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> + <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> + <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> + <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> + <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> + <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> + <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> + <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> + <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-primary">Save changes</button> </div> </div> - - <hr> - - <h4>Overflowing text to show scroll behavior</h4> - <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> - <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> - <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> - <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> - <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> - <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> - <p>Cras mattis consectetur purus sit amet fermentum. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.</p> - <p>Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Vivamus sagittis lacus vel augue laoreet rutrum faucibus dolor auctor.</p> - <p>Aenean lacinia bibendum nulla sed consectetur. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Donec sed odio dui. Donec ullamcorper nulla non metus auctor fringilla.</p> </div> - <div class="modal-footer"> - <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> - <button type="button" class="btn btn-primary">Save changes</button> - </div> - </div> - </div> - </div> - - <div id="myModal2" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel2"> - <div class="modal-dialog" role="document"> - <div class="modal-content"> - <div class="modal-header"> - <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> - <h4 class="modal-title" id="myModalLabel2">Modal Heading</h4> - </div> - <div class="modal-body"> - <ol> - <li>Ensure you're using Firefox.</li> - <li>Open a new tab and then switch back to this tab.</li> - <li>Click into this input: <input type="text" id="ff-bug-input"></li> - <li>Switch to the other tab and then back to this tab.</li> - </ol> - <p>Test result: <strong id="ff-bug-test-result"></strong></p> + + <div class="modal fade" id="firefoxModal" tabindex="-1" role="dialog" aria-labelledby="firefoxModalLabel" aria-hidden="true"> + <div class="modal-dialog" role="document"> + <div class="modal-content"> + <div class="modal-header"> + <button type="button" class="close" data-dismiss="modal" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + <h4 class="modal-title" id="firefoxModalLabel">Firefox Bug Test</h4> + </div> + <div class="modal-body"> + <ol> + <li>Ensure you're using Firefox.</li> + <li>Open a new tab and then switch back to this tab.</li> + <li>Click into this input: <input type="text" id="ff-bug-input"></li> + <li>Switch to the other tab and then back to this tab.</li> + </ol> + <p>Test result: <strong id="ff-bug-test-result"></strong></p> + </div> + <div class="modal-footer"> + <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button> + <button type="button" class="btn btn-primary">Save changes</button> + </div> + </div> </div> </div> + + <button type="button" class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> + Launch demo modal + </button> + + <button type="button" class="btn btn-primary btn-lg" id="tall-toggle"> + Toggle tall <body> content + </button> + + <br><br> + + <button type="button" class="btn btn-secondary btn-lg" data-toggle="modal" data-target="#firefoxModal"> + Launch Firefox bug test modal + </button> + (<a href="https://github.com/twbs/bootstrap/issues/18365">See Issue #18365</a>) + + <br><br> + + <div class="bg-inverse text-white p-2" id="tall" style="display: none;"> + Tall body content to force the page to have a scrollbar. + </div> </div> - </div> - - <button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#myModal"> - Launch demo modal - </button> - - <button id="tall-toggle" class="btn btn-default">Toggle tall <body> content</button> - <br><br> - <button class="btn btn-secondary btn-lg" data-toggle="modal" data-target="#myModal2"> - Launch Firefox bug test modal - </button> - (<a href="https://github.com/twbs/bootstrap/issues/18365">See Issue #18365</a>) - <br><br> - <div id="tall" style="display: none;"> - Tall body content to force the page to have a scrollbar. - </div> - -</div> - -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../vendor/tether.min.js"></script> - -<script src="../../dist/util.js"></script> -<script src="../../dist/modal.js"></script> -<script src="../../dist/collapse.js"></script> -<script src="../../dist/tooltip.js"></script> -<script src="../../dist/popover.js"></script> - -<!-- <script src="../../transition.js"></script> -<script src="../../tooltip.js"></script> -<script src="../../popover.js"></script> --> - -<!-- JavaScript Test --> -<script> -var firefoxTestDone = false -function reportFirefoxTestResult(result) { - if (!firefoxTestDone) { - $('#ff-bug-test-result') - .addClass(result ? 'text-success' : 'text-danger') - .text(result ? 'PASS' : 'FAIL') - } - firefoxTestDone = true -} - -$(function () { - $('.js-popover').popover() - $('.js-tooltip').tooltip() - $('#tall-toggle').click(function () { - $('#tall').toggle() - }) - $('#ff-bug-input').one('focus', function () { - $('#myModal2').on('focus', function () { - reportFirefoxTestResult(false) - }) - $('#ff-bug-input').on('focus', function () { - reportFirefoxTestResult(true) - }) - }) -}) -</script> - -</body> + + <script src="../vendor/jquery.min.js"></script> + <script src="../vendor/tether.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/modal.js"></script> + <script src="../../dist/collapse.js"></script> + <script src="../../dist/tooltip.js"></script> + <script src="../../dist/popover.js"></script> + + <script> + var firefoxTestDone = false + function reportFirefoxTestResult(result) { + if (!firefoxTestDone) { + $('#ff-bug-test-result') + .addClass(result ? 'text-success' : 'text-danger') + .text(result ? 'PASS' : 'FAIL') + } + } + + // Should throw an error because modal is in transition + function testModalTransitionError() { + var err = false + // Close #myModal + $('#myModal').on('shown.bs.modal', function () { + $('#myModal').modal('hide').off('shown.bs.modal') + if (!err) { + alert('No error thrown for : testModalTransitionError') + } + }) + + try { + $('#myModal').modal('show').modal('hide') + } + catch (e) { + err = true + console.error(e.message) + } + } + + $(function () { + $('[data-toggle="popover"]').popover() + $('[data-toggle="tooltip"]').tooltip() + + $('#tall-toggle').click(function () { + $('#tall').toggle() + }) + + $('#ff-bug-input').one('focus', function () { + $('#firefoxModal').on('focus', reportFirefoxTestResult.bind(false)) + $('#ff-bug-input').on('focus', reportFirefoxTestResult.bind(true)) + }) + testModalTransitionError() + }) + </script> + </body> </html> diff --git a/js/tests/visual/popover.html b/js/tests/visual/popover.html index 927e71b00..75fb926c1 100644 --- a/js/tests/visual/popover.html +++ b/js/tests/visual/popover.html @@ -1,47 +1,44 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Popover</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.css"> -</head> -<body> - -<div class="container"> - - <h1>Popover <small>Bootstrap Visual Test</small></h1> - - <button type="button" class="btn btn-default js-popover" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." data-original-title="" title=""> - Popover on left - </button> - <button type="button" class="btn btn-default js-popover" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." data-original-title="" title=""> - Popover on top - </button> - <button type="button" class="btn btn-default js-popover" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." data-original-title="" title=""> - Popover on bottom - </button> - <button type="button" class="btn btn-default js-popover" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus." data-original-title="" title=""> - Popover on right - </button> - -</div> - -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../vendor/tether.min.js"></script> -<script src="../../dist/util.js"></script> -<script src="../../dist/tooltip.js"></script> -<script src="../../dist/popover.js"></script> - - -<!-- JavaScript Test --> -<script> -$(function () { - $('.js-popover').popover() -}) -</script> - -</body> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Popover</title> + </head> + <body> + <div class="container"> + <h1>Popover <small>Bootstrap Visual Test</small></h1> + + <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="top" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> + Popover on top + </button> + + <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="right" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> + Popover on right + </button> + + <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="bottom" data-content="Vivamus + sagittis lacus vel augue laoreet rutrum faucibus."> + Popover on bottom + </button> + + <button type="button" class="btn btn-secondary" data-container="body" data-toggle="popover" data-placement="left" data-content="Vivamus sagittis lacus vel augue laoreet rutrum faucibus."> + Popover on left + </button> + </div> + + <script src="../vendor/jquery.min.js"></script> + <script src="../vendor/tether.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/tooltip.js"></script> + <script src="../../dist/popover.js"></script> + + <script> + $(function () { + $('[data-toggle="popover"]').popover() + }) + </script> + </body> </html> diff --git a/js/tests/visual/scrollspy.html b/js/tests/visual/scrollspy.html index efe6f593b..337611126 100644 --- a/js/tests/visual/scrollspy.html +++ b/js/tests/visual/scrollspy.html @@ -1,90 +1,93 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Scrollspy</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> - <style> - body { padding-top: 70px; } - </style> -</head> -<body data-spy="scroll" data-target=".navbar" data-offset="70"> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Scrollspy</title> + <style> + body { padding-top: 70px; } + </style> + </head> + <body data-spy="scroll" data-target=".navbar" data-offset="70"> + <div class="container"> + <nav class="navbar navbar-fixed-top navbar-dark bg-inverse"> + <a class="navbar-brand" href="#">Scrollspy test</a> + <ul class="nav navbar-nav"> + <li class="nav-item"> + <a class="nav-link" href="#fat">@fat</a> + </li> + <li class="nav-item"> + <a class="nav-link" href="#mdo">@mdo</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu" aria-labelledby="dropdown"> + <a class="dropdown-item" href="#one">one</a> + <a class="dropdown-item" href="#two">two</a> + <div class="dropdown-divider"></div> + <a class="dropdown-item" href="#three">three</a> + </div> + </li> + <li class="nav-item"> + <a class="nav-link" href="#final">Final</a> + </li> + </ul> + </nav> -<div class="container"> - - <nav class="navbar navbar-dark navbar-fixed-top bg-inverse"> - <div class="js-navbar-scrollspy"> - <ul class="nav navbar-nav"> - <li class="nav-item"><a class="nav-link active" href="#fat">@fat</a></li> - <li class="nav-item"><a class="nav-link" href="#mdo">@mdo</a></li> - <li class="dropdown nav-item"> - <a href="#" class="dropdown-toggle nav-link" data-toggle="dropdown">Dropdown</a> - <div class="dropdown-menu" role="menu"> - <a class="dropdown-item" href="#one" tabindex="-1">one</a> - <a class="dropdown-item" href="#two" tabindex="-1">two</a> - <div class="dropdown-divider"></div> - <a class="dropdown-item" href="#three" tabindex="-1">three</a> - </div> - </li> - </ul> + <h2 id="fat">@fat</h2> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <hr> + <h2 id="mdo">@mdo</h2> + <p>Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <hr> + <h2 id="one">one</h2> + <p>Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <hr> + <h2 id="two">two</h2> + <p>In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <hr> + <h2 id="three">three</h2> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats. + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> + <hr> + <h2 id="final">Final section</h2> + <p>Ad leggings keytar, brunch id art party dolor labore.</p> </div> - </nav> - - - <h2 id="fat">@fat</h2> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <hr> - <h2 id="mdo">@mdo</h2> - <p>Veniam marfa mustache skateboard, adipisicing fugiat velit pitchfork beard. Freegan beard aliqua cupidatat mcsweeney's vero. Cupidatat four loko nisi, ea helvetica nulla carles. Tattooed cosby sweater food truck, mcsweeney's quis non freegan vinyl. Lo-fi wes anderson +1 sartorial. Carles non aesthetic exercitation quis gentrify. Brooklyn adipisicing craft beer vice keytar deserunt.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <hr> - <h2 id="one">one</h2> - <p>Occaecat commodo aliqua delectus. Fap craft beer deserunt skateboard ea. Lomo bicycle rights adipisicing banh mi, velit ea sunt next level locavore single-origin coffee in magna veniam. High life id vinyl, echo park consequat quis aliquip banh mi pitchfork. Vero VHS est adipisicing. Consectetur nisi DIY minim messenger bag. Cred ex in, sustainable delectus consectetur fanny pack iphone.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <hr> - <h2 id="two">two</h2> - <p>In incididunt echo park, officia deserunt mcsweeney's proident master cleanse thundercats sapiente veniam. Excepteur VHS elit, proident shoreditch +1 biodiesel laborum craft beer. Single-origin coffee wayfarers irure four loko, cupidatat terry richardson master cleanse. Assumenda you probably haven't heard of them art party fanny pack, tattooed nulla cardigan tempor ad. Proident wolf nesciunt sartorial keffiyeh eu banh mi sustainable. Elit wolf voluptate, lo-fi ea portland before they sold out four loko. Locavore enim nostrud mlkshk brooklyn nesciunt.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <hr> - <h2 id="three">three</h2> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Keytar twee blog, culpa messenger bag marfa whatever delectus food truck. Sapiente synth id assumenda. Locavore sed helvetica cliche irony, thundercats you probably haven't heard of them consequat hoodie gluten-free lo-fi fap aliquip. Labore elit placeat before they sold out, terry richardson proident brunch nesciunt quis cosby sweater pariatur keffiyeh ut helvetica artisan. Cardigan craft beer seitan readymade velit. VHS chambray laboris tempor veniam. Anim mollit minim commodo ullamco thundercats. - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - <p>Ad leggings keytar, brunch id art party dolor labore. Pitchfork yr enim lo-fi before they sold out qui. Tumblr farm-to-table bicycle rights whatever. Anim keffiyeh carles cardigan. Velit seitan mcsweeney's photo booth 3 wolf moon irure. Cosby sweater lomo jean shorts, williamsburg hoodie minim qui you probably haven't heard of them et cardigan trust fund culpa biodiesel wes anderson aesthetic. Nihil tattooed accusamus, cred irony biodiesel keffiyeh artisan ullamco consequat.</p> - -</div> - -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../../dist/util.js"></script> -<script src="../../dist/scrollspy.js"></script> -<script src="../../dist/dropdown.js"></script> -<script src="../../dist/collapse.js"></script> -</body> + <script src="../vendor/jquery.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/scrollspy.js"></script> + <script src="../../dist/dropdown.js"></script> + <script src="../../dist/collapse.js"></script> + </body> </html> diff --git a/js/tests/visual/tab.html b/js/tests/visual/tab.html index d09622d72..14481cac5 100644 --- a/js/tests/visual/tab.html +++ b/js/tests/visual/tab.html @@ -1,162 +1,173 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Tab</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> - <style> - h4 { - margin: 40px 0 10px; - } + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Tab</title> + <style> + h4 { + margin: 40px 0 10px; + } + </style> + </head> + <body> + <div class="container"> + <h1>Tab <small>Bootstrap Visual Test</small></h1> - .nav-tabs { - margin-bottom: 15px; - } - </style> -</head> -<body> + <h4>Tabs without fade</h4> -<div class="container"> + <ul class="nav nav-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link active" data-toggle="tab" href="#home" role="tab">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" data-toggle="tab" href="#profile" role="tab">Profile</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu" aria-labelledby="dropdown"> + <a class="dropdown-item" data-toggle="tab" href="#fat" role="tab">@fat</a> + <a class="dropdown-item" data-toggle="tab" href="#mdo" role="tab">@mdo</a> + </div> + </li> + </ul> - <h1>Tab <small>Bootstrap Visual Test</small></h1> - - <h4>Tabs without fade</h4> - - <ul id="myTab" class="nav nav-tabs"> - <li class="nav-item"><a href="#home" class="nav-link active" data-toggle="tab">Home</a></li> - <li class="nav-item"><a href="#profile" data-toggle="tab" class="nav-link">Profile</a></li> - <li class="dropdown nav-item"> - <a href="#" id="myTabDrop1" class="dropdown-toggle nav-link" data-toggle="dropdown">Dropdown <b class="caret"></b></a> - <div class="dropdown-menu" role="menu" aria-labelledby="myTabDrop1"> - <a class="dropdown-item" href="#dropdown1" tabindex="-1" data-toggle="tab">@fat</a> - <a class="dropdown-item" href="#dropdown2" tabindex="-1" data-toggle="tab">@mdo</a> + <div class="tab-content" role="tablist"> + <div class="tab-pane active" id="home" role="tabpanel"> + <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> + <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> + </div> + <div class="tab-pane" id="profile" role="tabpanel"> + <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> + <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> + </div> + <div class="tab-pane" id="fat" role="tabpanel"> + <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> + <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> + </div> + <div class="tab-pane" id="mdo" role="tabpanel"> + <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> + <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> + </div> </div> - </li> - </ul> - <div id="myTabContent" class="tab-content"> - <div class="tab-pane active" id="home"> - <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> - <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> - </div> - <div class="tab-pane" id="profile"> - <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> - <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> - </div> - <div class="tab-pane" id="dropdown1"> - <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> - <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> - </div> - <div class="tab-pane" id="dropdown2"> - <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> - <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> - </div> - </div> - <h4>Tabs with fade</h4> + <h4>Tabs with fade</h4> - <ul id="myTab1" class="nav nav-tabs"> - <li class="nav-item"><a class="nav-link active" href="#home1" data-toggle="tab">Home</a></li> - <li class="nav-item"><a class="nav-link" href="#profile1" data-toggle="tab">Profile</a></li> - <li class="dropdown nav-item"> - <a href="#" id="myTabDrop2" class="dropdown-toggle nav-link" data-toggle="dropdown">Dropdown <b class="caret"></b></a> - <div class="dropdown-menu" role="menu" aria-labelledby="myTabDrop2"> - <a class="dropdown-item" href="#dropdown1-1" tabindex="-1" data-toggle="tab">@fat</a> - <a class="dropdown-item" href="#dropdown1-2" tabindex="-1" data-toggle="tab">@mdo</a> + <ul class="nav nav-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link active" data-toggle="tab" href="#home2" role="tab">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" data-toggle="tab" href="#profile2" role="tab">Profile</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown2" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu" aria-labelledby="dropdown2"> + <a class="dropdown-item" data-toggle="tab" href="#fat2" role="tab">@fat</a> + <a class="dropdown-item" data-toggle="tab" href="#mdo2" role="tab">@mdo</a> + </div> + </li> + </ul> + + <div class="tab-content" role="tablist"> + <div class="tab-pane fade in active" id="home2" role="tabpanel"> + <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> + <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> + </div> + <div class="tab-pane fade" id="profile2" role="tabpanel"> + <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> + <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> + </div> + <div class="tab-pane fade" id="fat2" role="tabpanel"> + <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> + <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> + </div> + <div class="tab-pane fade" id="mdo2" role="tabpanel"> + <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> + <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> + </div> </div> - </li> - </ul> - <div id="myTabContent1" class="tab-content"> - <div class="tab-pane fade in active" id="home1"> - <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> - <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> - </div> - <div class="tab-pane fade" id="profile1"> - <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> - <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> - </div> - <div class="tab-pane fade" id="dropdown1-1"> - <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> - <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> - </div> - <div class="tab-pane fade" id="dropdown1-2"> - <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> - <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> - </div> - </div> - <h4>Tabs without fade (no initially active pane)</h4> + <h4>Tabs without fade (no initially active pane)</h4> - <ul id="myTab2" class="nav nav-tabs"> - <li class="nav-item"><a class="nav-link" href="#home2" data-toggle="tab">Home</a></li> - <li class="nav-item"><a class="nav-link" href="#profile2" data-toggle="tab">Profile</a></li> - <li class="dropdown nav-item"> - <a href="#" id="myTabDrop3" class="dropdown-toggle nav-link" data-toggle="dropdown">Dropdown <b class="caret"></b></a> - <div class="dropdown-menu" role="menu" aria-labelledby="myTabDrop3"> - <a class="dropdown-item" href="#dropdown2-1" tabindex="-1" data-toggle="tab">@fat</a> - <a class="dropdown-item" href="#dropdown2-2" tabindex="-1" data-toggle="tab">@mdo</a> + <ul class="nav nav-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link" data-toggle="tab" href="#home3" role="tab">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" data-toggle="tab" href="#profile3" role="tab">Profile</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown3" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu" aria-labelledby="dropdown3"> + <a class="dropdown-item" data-toggle="tab" href="#fat3" role="tab">@fat</a> + <a class="dropdown-item" data-toggle="tab" href="#mdo3" role="tab">@mdo</a> + </div> + </li> + </ul> + + <div class="tab-content" role="tablist"> + <div class="tab-pane" id="home3" role="tabpanel"> + <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> + <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> + </div> + <div class="tab-pane" id="profile3" role="tabpanel"> + <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> + <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> + </div> + <div class="tab-pane" id="fat3" role="tabpanel"> + <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> + <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> + </div> + <div class="tab-pane" id="mdo3" role="tabpanel"> + <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> + <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> + </div> </div> - </li> - </ul> - <div id="myTabContent2" class="tab-content"> - <div class="tab-pane" id="home2"> - <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> - <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> - </div> - <div class="tab-pane" id="profile2"> - <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> - <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> - </div> - <div class="tab-pane" id="dropdown2-1"> - <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> - <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> - </div> - <div class="tab-pane" id="dropdown2-2"> - <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> - <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> - </div> - </div> - <h4>Tabs with fade (no initially active pane)</h4> + <h4>Tabs with fade (no initially active pane)</h4> + + <ul class="nav nav-tabs" role="tablist"> + <li class="nav-item"> + <a class="nav-link" data-toggle="tab" href="#home4" role="tab">Home</a> + </li> + <li class="nav-item"> + <a class="nav-link" data-toggle="tab" href="#profile4" role="tab">Profile</a> + </li> + <li class="nav-item dropdown"> + <a class="nav-link dropdown-toggle" href="#" id="dropdown4" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">Dropdown</a> + <div class="dropdown-menu" aria-labelledby="dropdown4"> + <a class="dropdown-item" data-toggle="tab" href="#fat4" role="tab">@fat</a> + <a class="dropdown-item" data-toggle="tab" href="#mdo4" role="tab">@mdo</a> + </div> + </li> + </ul> - <ul id="myTab3" class="nav nav-tabs"> - <li class="nav-item"><a class="nav-link" href="#home3" data-toggle="tab">Home</a></li> - <li class="nav-item"><a class="nav-link" href="#profile3" data-toggle="tab">Profile</a></li> - <li class="dropdown nav-item"> - <a href="#" id="myTabDrop4" class="dropdown-toggle nav-link" data-toggle="dropdown">Dropdown <b class="caret"></b></a> - <div class="dropdown-menu" role="menu" aria-labelledby="myTabDrop4"> - <a class="dropdown-item" href="#dropdown3-1" tabindex="-1" data-toggle="tab">@fat</a> - <a class="dropdown-item" href="#dropdown3-2" tabindex="-1" data-toggle="tab">@mdo</a> + <div class="tab-content"> + <div class="tab-pane fade" id="home4" role="tabpanel"> + <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> + <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> + </div> + <div class="tab-pane fade" id="profile4" role="tabpanel"> + <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> + <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> + </div> + <div class="tab-pane fade" id="fat4" role="tabpanel"> + <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> + <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> + </div> + <div class="tab-pane fade" id="mdo4" role="tabpanel"> + <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> + <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> + </div> </div> - </li> - </ul> - <div id="myTabContent3" class="tab-content"> - <div class="tab-pane fade" id="home3"> - <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> - <p>Raw denim you probably haven't heard of them jean shorts Austin. Nesciunt tofu stumptown aliqua, retro synth master cleanse. Mustache cliche tempor, williamsburg carles vegan helvetica. Reprehenderit butcher retro keffiyeh dreamcatcher synth. Cosby sweater eu banh mi, qui irure terry richardson ex squid. Aliquip placeat salvia cillum iphone. Seitan aliquip quis cardigan american apparel, butcher voluptate nisi qui.</p> </div> - <div class="tab-pane fade" id="profile3"> - <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> - <p>Food truck fixie locavore, accusamus mcsweeney's marfa nulla single-origin coffee squid. Exercitation +1 labore velit, blog sartorial PBR leggings next level wes anderson artisan four loko farm-to-table craft beer twee. Qui photo booth letterpress, commodo enim craft beer mlkshk aliquip jean shorts ullamco ad vinyl cillum PBR. Homo nostrud organic, assumenda labore aesthetic magna delectus mollit. Keytar helvetica VHS salvia yr, vero magna velit sapiente labore stumptown. Vegan fanny pack odio cillum wes anderson 8-bit, sustainable jean shorts beard ut DIY ethical culpa terry richardson biodiesel. Art party scenester stumptown, tumblr butcher vero sint qui sapiente accusamus tattooed echo park.</p> - </div> - <div class="tab-pane fade" id="dropdown3-1"> - <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> - <p>Etsy mixtape wayfarers, ethical wes anderson tofu before they sold out mcsweeney's organic lomo retro fanny pack lo-fi farm-to-table readymade. Messenger bag gentrify pitchfork tattooed craft beer, iphone skateboard locavore carles etsy salvia banksy hoodie helvetica. DIY synth PBR banksy irony. Leggings gentrify squid 8-bit cred pitchfork. Williamsburg banh mi whatever gluten-free, carles pitchfork biodiesel fixie etsy retro mlkshk vice blog. Scenester cred you probably haven't heard of them, vinyl craft beer blog stumptown. Pitchfork sustainable tofu synth chambray yr.</p> - </div> - <div class="tab-pane fade" id="dropdown3-2"> - <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> - <p>Trust fund seitan letterpress, keytar raw denim keffiyeh etsy art party before they sold out master cleanse gluten-free squid scenester freegan cosby sweater. Fanny pack portland seitan DIY, art party locavore wolf cliche high life echo park Austin. Cred vinyl keffiyeh DIY salvia PBR, banh mi before they sold out farm-to-table VHS viral locavore cosby sweater. Lomo wolf viral, mustache readymade thundercats keffiyeh craft beer marfa ethical. Wolf salvia freegan, sartorial keffiyeh echo park vegan.</p> - </div> - </div> - -</div> - -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../../dist/util.js"></script> -<script src="../../dist/tab.js"></script> -<script src="../../dist/dropdown.js"></script> -</body> + <script src="../vendor/jquery.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/tab.js"></script> + <script src="../../dist/dropdown.js"></script> + </body> </html> diff --git a/js/tests/visual/tooltip.html b/js/tests/visual/tooltip.html index f6b64ce95..6cd33e7e6 100644 --- a/js/tests/visual/tooltip.html +++ b/js/tests/visual/tooltip.html @@ -1,42 +1,67 @@ <!DOCTYPE html> <html> -<head> - <meta charset="utf-8"> - <meta http-equiv="X-UA-Compatible" content="IE=edge"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <title>Tooltip</title> - <link rel="stylesheet" href="../../../dist/css/bootstrap.css"> -</head> -<body> + <head> + <meta charset="utf-8"> + <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> + <meta http-equiv="x-ua-compatible" content="ie=edge"> + <link rel="stylesheet" href="../../../dist/css/bootstrap.min.css"> + <title>Tooltip</title> + </head> + <body> + <div class="container"> + <h1>Tooltip <small>Bootstrap Visual Test</small></h1> -<div class="container"> + <p class="text-muted">Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" data-toggle="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" data-toggle="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral.</p> - <h1>Tooltip <small>Bootstrap Visual Test</small></h1> + <hr> - <p class="muted" style="margin-bottom: 0;">Tight pants next level keffiyeh <a href="#" data-toggle="tooltip" title="Default tooltip">you probably</a> haven't heard of them. Photo booth beard raw denim letterpress vegan messenger bag stumptown. Farm-to-table seitan, mcsweeney's fixie sustainable quinoa 8-bit american apparel <a href="#" data-toggle="tooltip" title="Another tooltip">have a</a> terry richardson vinyl chambray. Beard stumptown, cardigans banh mi lomo thundercats. Tofu biodiesel williamsburg marfa, four loko mcsweeney's cleanse vegan chambray. A really ironic artisan <a href="#" data-toggle="tooltip" title="Another one here too">whatever keytar</a>, scenester farm-to-table banksy Austin <a href="#" data-toggle="tooltip" title="The last tip!">twitter handle</a> freegan cred raw denim single-origin coffee viral. - </p> - <hr> - <p> - <button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="left" title="" data-original-title="Tooltip on left">Tooltip on left</button> - <button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="top" title="Tooltip on top">Tooltip on top</button> - <button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom">Tooltip on bottom</button> - <button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="right" title="Tooltip on right">Tooltip on right</button> - </p> + <p> + <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="top" title="Tooltip on top"> + Tooltip on top + </button> + <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="right" title="Tooltip on right"> + Tooltip on right + </button> + <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="bottom" title="Tooltip on bottom"> + Tooltip on bottom + </button> + <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-placement="left" title="Tooltip on left"> + Tooltip on left + </button> + <button type="button" class="btn btn-secondary" data-toggle="tooltip" data-html="true" title="<em>Tooltip</em> <u>with</u> <b>HTML</b>"> + Tooltip with HTML + </button> + </p> + </div> -</div> + <script src="../vendor/jquery.min.js"></script> + <script src="../vendor/tether.min.js"></script> + <script src="../../dist/util.js"></script> + <script src="../../dist/tooltip.js"></script> -<!-- JavaScript Includes --> -<script src="../vendor/jquery.min.js"></script> -<script src="../vendor/tether.min.js"></script> -<script src="../../dist/util.js"></script> -<script src="../../dist/tooltip.js"></script> + <script> + $(function () { + $('[data-toggle="tooltip"]').tooltip() + testTooltipTransitionError() + }) -<!-- JavaScript Test --> -<script> -$(function () { - $('[data-toggle="tooltip"]').tooltip() -}) -</script> - -</body> + // Should throw an error because tooltip is in transition + function testTooltipTransitionError() { + var err = false + $('#btnOne').on('shown.bs.tooltip', function () { + $('#btnOne').tooltip('hide').off('shown.bs.tooltip') + if (!err) { + alert('No error thrown for : testTooltipTransitionError') + } + }) + try { + $('#btnOne').tooltip('show').tooltip('hide') + } + catch (e) { + err = true + console.error(e.message) + } + } + </script> + </body> </html> |
