1
0
mirror of https://github.com/twbs/bootstrap.git synced 2025-08-21 04:41:36 +02:00

tooltip without jquery

This commit is contained in:
Alessandro Chitolina
2017-09-21 18:04:47 +02:00
committed by XhmikosR
parent 7c1d0a1097
commit cc6e130fc1
11 changed files with 306 additions and 235 deletions

View File

@@ -254,4 +254,18 @@ $(function () {
EventHandler.trigger(element, 'click')
document.body.removeChild(element)
})
QUnit.test('off should remove a listener registered by .one', function (assert) {
assert.expect(0)
var element = document.createElement('div')
var handler = function () {
assert.notOk(true, 'listener called')
}
EventHandler.one(element, 'foobar', handler)
EventHandler.off(element, 'foobar', handler)
EventHandler.trigger(element, 'foobar')
})
})