Bootstrap Pop-up Subscribe





Jquery


<script type="text/javascript">
$(window).load(function(){
$('#myModal').modal('show');
});
</script>

HTML

<div class="modal fade welcome_box" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">

<button type="button" class="close close_btn" data-dismiss="modal"></button>

</div>

data-keyboard="false" - this attribute for disable the background click .

HTML


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Bootstrap Pop-up Subscribe On load </title>

<!-- Bootstrap -->
<link href="css/bootstrap.min.css" rel="stylesheet">

</head>
<body>
<div class="modal fade welcome_box" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog" >
<div class="modal-content" >
<div class="modal-body">
<button type="button" class="close close_btn" data-dismiss="modal">
<img src="close_btn.png" alt="close_btn" />
</button>
<form>
<div class="form-group">
<label for="recipient-name" class="control-label">Subscribe : </label>
<input type="text" class="form-control" id="subscribe">
</div>
<div class="form-group">
<button type="button" class="btn btn-primary">Submit</button>
</div>
</form>
</div>
</div>
</div>
</div>


<style>
.close_btn {
left: 28px;
position: relative;
top: -24px;
}
.modal-dialog {
margin: 130px auto 30px;
width: 400px;
}
</style>
<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="js/bootstrap.min.js"></script>

<script type="text/javascript">
$(window).load(function(){
$('#myModal').modal('show');
});
</script>

</body>
</html>