Ich habe ein Problem mit einem Modal, ich habe eine und wenn ich es schließe ich brauche etwas laufen, eigentlich, wenn es schließt, muss ich aktualisieren Sie die index.php.etwas tun, wenn Modal verbirgt
<!DOCTYPE html>
<html>
<head>
<script src="js/jquery.min_2.1.4.js"></script>
<script src="js/bootstrap3.3.min.js"></script>
<link rel="stylesheet" href="http://netdna.bootstrapcdn.com/twitter-bootstrap/2.3.1/css/bootstrap-combined.min.css" />
<script>
$('#myModal').modal({
'show': false
});
$('#btnModal').click(function() {
$('#myModal').modal('show');
});
$('#myModal').on('hide', function(e) {
if (!confirm('You want to close me?'))
e.preventDefault();
});
</script>
</head>
<body><!-- Button trigger modal -->
<button type="button" class="btn btn-success btn-lg" data-toggle="modal" data-target="#myModal">
Launch demo modal
</button>
<a role="button" class="btn" id="btnModal">Launch demo modal</a>
<!-- Modal -->
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h3 id="myModalLabel">Modal header</h3>
</div>
<div class="modal-body">
<p>One fine body…</p>
</div>
<div class="modal-footer">
<button class="btn" data-dismiss="modal" aria-hidden="true">Close</button>
<button class="btn btn-primary">Save changes</button>
</div>
</div>
</body>
</html>
Ich habe dieses Beispiel, und ich kann es nicht funktionieren. Jemand könnte mir helfen? Thks