mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-11 18:02:28 +03:00
add preventDefault support for all inital event types (show, close, hide, etc.) + fix small bug with scrollspy.last
This commit is contained in:
Vendored
+15
@@ -38,4 +38,19 @@ $(function () {
|
||||
ok(!$('#qunit-fixture').find('.alert-message').length, 'element removed from dom')
|
||||
})
|
||||
|
||||
test("should not fire closed when close is prevented", function () {
|
||||
$.support.transition = false
|
||||
stop();
|
||||
$('<div class="alert"/>')
|
||||
.bind('close', function (e) {
|
||||
e.preventDefault();
|
||||
ok(true);
|
||||
start();
|
||||
})
|
||||
.bind('closed', function () {
|
||||
ok(false);
|
||||
})
|
||||
.alert('close')
|
||||
})
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user