0
0
mirror of https://github.com/twbs/bootstrap.git synced 2024-12-01 13:24:25 +01:00

Swapped out .hasClass() with .is() when checking for multiple classes

This commit is contained in:
Jørgen Borgesen 2012-05-20 20:10:21 +02:00
parent e388a5e475
commit 8dda83906d

View File

@ -33,7 +33,7 @@ $(function () {
.tooltip({placement: 'bottom'})
.tooltip('show')
ok($(".tooltip").hasClass('fade bottom in'), 'has correct classes applied')
ok($(".tooltip").is('.fade.bottom.in'), 'has correct classes applied')
tooltip.tooltip('hide')
})
@ -69,10 +69,10 @@ $(function () {
tooltip.trigger('mouseenter')
setTimeout(function () {
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in')
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
tooltip.trigger('mouseout')
setTimeout(function () {
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in')
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
start()
}, 200)
}, 100)
@ -104,10 +104,10 @@ $(function () {
stop()
tooltip.trigger('mouseenter')
setTimeout(function () {
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in')
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
tooltip.trigger('mouseout')
setTimeout(function () {
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in')
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
start()
}, 100)
}, 50)
@ -120,9 +120,9 @@ $(function () {
stop()
tooltip.trigger('mouseenter')
setTimeout(function () {
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in')
ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
setTimeout(function () {
ok(!$(".tooltip").hasClass('fade in'), 'tooltip has faded in')
ok(!$(".tooltip").is('.fade.in'), 'tooltip has faded in')
start()
}, 200)
}, 100)