mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-16 10:34:07 +02:00
rewritten tab without jquery
This commit is contained in:
committed by
XhmikosR
parent
90261b484c
commit
7f08061eca
@@ -320,7 +320,7 @@ $(function () {
|
||||
'</ul>'
|
||||
var $tabs = $(tabsHTML).appendTo('#qunit-fixture')
|
||||
|
||||
$tabs.find('li:last-child a').trigger('click')
|
||||
EventHandler.trigger($tabs.find('li:last-child a')[0], 'click')
|
||||
assert.notOk($tabs.find('li:first-child a').hasClass('active'))
|
||||
assert.ok($tabs.find('li:last-child a').hasClass('active'))
|
||||
})
|
||||
@@ -339,7 +339,7 @@ $(function () {
|
||||
'</ul>'
|
||||
var $tabs = $(tabsHTML).appendTo('#qunit-fixture')
|
||||
|
||||
$tabs.find('li:first-child a').trigger('click')
|
||||
EventHandler.trigger($tabs.find('li:first-child a')[0], 'click')
|
||||
assert.ok($tabs.find('li:first-child a').hasClass('active'))
|
||||
assert.notOk($tabs.find('li:last-child a').hasClass('active'))
|
||||
assert.notOk($tabs.find('li:last-child .dropdown-menu a:first-child').hasClass('active'))
|
||||
@@ -378,9 +378,10 @@ $(function () {
|
||||
|
||||
$('#tab1').on('shown.bs.tab', function () {
|
||||
assert.ok($('#x-tab1').hasClass('active'))
|
||||
$('#tabNested2').trigger($.Event('click'))
|
||||
EventHandler.trigger($('#tabNested2')[0], 'click')
|
||||
})
|
||||
.trigger($.Event('click'))
|
||||
|
||||
EventHandler.trigger($('#tab1')[0], 'click')
|
||||
})
|
||||
|
||||
QUnit.test('should not remove fade class if no active pane is present', function (assert) {
|
||||
@@ -410,9 +411,11 @@ $(function () {
|
||||
|
||||
done()
|
||||
})
|
||||
.trigger($.Event('click'))
|
||||
|
||||
EventHandler.trigger($('#tab-home')[0], 'click')
|
||||
})
|
||||
.trigger($.Event('click'))
|
||||
|
||||
EventHandler.trigger($('#tab-profile')[0], 'click')
|
||||
})
|
||||
|
||||
QUnit.test('should handle removed tabs', function (assert) {
|
||||
|
@@ -227,7 +227,10 @@
|
||||
|
||||
<script src="../../../node_modules/jquery/dist/jquery.slim.min.js"></script>
|
||||
<script src="../../../node_modules/popper.js/dist/umd/popper.min.js"></script>
|
||||
<script src="../../dist/dom/data.js"></script>
|
||||
<script src="../../dist/dom/eventHandler.js"></script>
|
||||
<script src="../../dist/dom/manipulator.js"></script>
|
||||
<script src="../../dist/dom/selectorEngine.js"></script>
|
||||
<script src="../../dist/util.js"></script>
|
||||
<script src="../../dist/tab.js"></script>
|
||||
<script src="../../dist/dropdown.js"></script>
|
||||
|
Reference in New Issue
Block a user