You can delay the click of the trigger button, then activate the modal directly:
$('[data-toggle=modal]').on('click', function (e) {
var $target = $($(this).data('target'));
$target.data('triggered',true);
setTimeout(function() {
if ($target.data('triggered')) {
$target.modal('show')
.data('triggered',false); // prevents multiple clicks from reopening
};
}, 3000); // milliseconds
return false;
});
http://jsfiddle.net/mblase75/H6UM4/
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…