The following code shows how to create fade in modal dialog.
<!DOCTYPE html>
<html>
<head>
<script type='text/javascript'
src='http://code.jquery.com/jquery-1.9.1.js'></script>
<script type='text/javascript'
src="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<link rel="stylesheet" type="text/css"
href="http://netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
<script type='text/javascript'>//<![CDATA[
$(function(){<!-- w ww . ja v a 2 s. c o m-->
$(function(){
$('#imageUpload').on('hidden', function () {
console.log('hidden event fired!');
});
$('#imageUpload').on('show', function () {
console.log('show event fired!');
});
});
});//]]>
</script>
</head>
<body>
<button type="button" data-toggle="modal" data-target="#imageUpload">Launch
modal</button>
<div class="modal fade" id="imageUpload" tabindex="-1">
<div class="modal-dialog">
<div class="modal-content">Upload form here</div>
<!-- /.modal-content -->
</div>
</div>
</body>
</html>