I want to display a twitter bootstrap modal when the user clicks the back,forward or refresh browser button,but I am not getting the desired o/p.This is what I tried :
@section Scripts{
<script type="text/javascript">
function myFunction() {
return $('#cancel_modal').modal('show');
}
</script>
}
and called it in the body :
<body onbeforeunload="return myFunction()">
Note: #cancel_modal is the id of the <div>
where bootstrap modal is defined.