mirror of
https://github.com/twbs/bootstrap.git
synced 2025-08-15 10:05:40 +02:00
Comply to the new JSCS rules.
This commit is contained in:
@@ -14,7 +14,9 @@
|
||||
// ====================
|
||||
|
||||
var Tab = function (element) {
|
||||
// jscs:disable requireDollarBeforejQueryAssignment
|
||||
this.element = $(element)
|
||||
// jscs:enable requireDollarBeforejQueryAssignment
|
||||
}
|
||||
|
||||
Tab.VERSION = '3.3.4'
|
||||
|
@@ -166,16 +166,16 @@ $(function () {
|
||||
assert.expect(3)
|
||||
var done = assert.async()
|
||||
|
||||
var div = $('<div id="modal-test"/>')
|
||||
div
|
||||
var $div = $('<div id="modal-test"/>')
|
||||
$div
|
||||
.on('shown.bs.modal', function () {
|
||||
assert.ok($('#modal-test').length, 'modal insterted into dom')
|
||||
assert.ok($('#modal-test').is(':visible'), 'modal visible')
|
||||
div.trigger($.Event('keydown', { which: 27 }))
|
||||
$div.trigger($.Event('keydown', { which: 27 }))
|
||||
|
||||
setTimeout(function () {
|
||||
assert.ok(!$('#modal-test').is(':visible'), 'modal hidden')
|
||||
div.remove()
|
||||
$div.remove()
|
||||
done()
|
||||
}, 0)
|
||||
})
|
||||
@@ -186,16 +186,16 @@ $(function () {
|
||||
assert.expect(3)
|
||||
var done = assert.async()
|
||||
|
||||
var div = $('<div id="modal-test"/>')
|
||||
div
|
||||
var $div = $('<div id="modal-test"/>')
|
||||
$div
|
||||
.on('shown.bs.modal', function () {
|
||||
assert.ok($('#modal-test').length, 'modal inserted into dom')
|
||||
assert.ok($('#modal-test').is(':visible'), 'modal visible')
|
||||
div.trigger($.Event('keyup', { which: 27 }))
|
||||
$div.trigger($.Event('keyup', { which: 27 }))
|
||||
|
||||
setTimeout(function () {
|
||||
assert.ok($('#modal-test').is(':visible'), 'modal still visible')
|
||||
div.remove()
|
||||
assert.ok($div.is(':visible'), 'modal still visible')
|
||||
$div.remove()
|
||||
done()
|
||||
}, 0)
|
||||
})
|
||||
|
Reference in New Issue
Block a user