mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-08 17:22:31 +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
@@ -22,4 +22,19 @@ $(function () {
|
||||
ok(/height/.test(el.attr('style')), 'has height set')
|
||||
})
|
||||
|
||||
test("should not fire shown when show is prevented", function () {
|
||||
$.support.transition = false
|
||||
stop();
|
||||
$('<div class="collapse"/>')
|
||||
.bind('show', function (e) {
|
||||
e.preventDefault();
|
||||
ok(true);
|
||||
start();
|
||||
})
|
||||
.bind('shown', function () {
|
||||
ok(false);
|
||||
})
|
||||
.collapse('show')
|
||||
})
|
||||
|
||||
})
|
||||
Reference in New Issue
Block a user