Commit 8dda8390 authored by Jørgen Borgesen's avatar Jørgen Borgesen

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

parent e388a5e4
...@@ -33,7 +33,7 @@ $(function () { ...@@ -33,7 +33,7 @@ $(function () {
.tooltip({placement: 'bottom'}) .tooltip({placement: 'bottom'})
.tooltip('show') .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') tooltip.tooltip('hide')
}) })
...@@ -69,10 +69,10 @@ $(function () { ...@@ -69,10 +69,10 @@ $(function () {
tooltip.trigger('mouseenter') tooltip.trigger('mouseenter')
setTimeout(function () { 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') tooltip.trigger('mouseout')
setTimeout(function () { setTimeout(function () {
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in') ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
start() start()
}, 200) }, 200)
}, 100) }, 100)
...@@ -104,10 +104,10 @@ $(function () { ...@@ -104,10 +104,10 @@ $(function () {
stop() stop()
tooltip.trigger('mouseenter') tooltip.trigger('mouseenter')
setTimeout(function () { 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') tooltip.trigger('mouseout')
setTimeout(function () { setTimeout(function () {
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in') ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
start() start()
}, 100) }, 100)
}, 50) }, 50)
...@@ -120,9 +120,9 @@ $(function () { ...@@ -120,9 +120,9 @@ $(function () {
stop() stop()
tooltip.trigger('mouseenter') tooltip.trigger('mouseenter')
setTimeout(function () { setTimeout(function () {
ok(!$(".tooltip").hasClass('fade in'), 'tooltip is not faded in') ok(!$(".tooltip").is('.fade.in'), 'tooltip is not faded in')
setTimeout(function () { setTimeout(function () {
ok(!$(".tooltip").hasClass('fade in'), 'tooltip has faded in') ok(!$(".tooltip").is('.fade.in'), 'tooltip has faded in')
start() start()
}, 200) }, 200)
}, 100) }, 100)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment