"Fancy subscribe modal (md, lg) with delay functionality on page load"
Bootstrap 4.1.1 Snippet by Sunlimetech

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<!-- subscribe Modal -->
<p class="text-center h1 mt-5 pt-5">2nd time <span id="Reloadpage" class="badge badge-success" title="click to Reload page">Refresh</span> your page to see the changes</p>
<p class="text-muted text-center">Wait! medium Modal will load in 5 seconds and large modal will load in 10 seconds.</p>
<div class="modal fade text-center py-5" id="subscribeModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-md" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="top-strip"></div>
<a class="h2" href="https://www.fiverr.com/share/qb8D02" target="_blank">Sunlimetech</a>
<h3 class="pt-5 mb-0 text-secondary">Newsletter</h3>
<p class="pb-1 text-muted"><small>Sign up to update with our latest news and products.</small></p>
<form>
<div class="input-group mb-3 w-75 mx-auto">
<input type="email" class="form-control" placeholder="sunlimetech@gmail.com" aria-label="Recipient's username" aria-describedby="button-addon2" required>
<div class="input-group-append">
<button class="btn btn-primary" type="button" id="button-addon2"><i class="fa fa-paper-plane"></i></button>
</div>
</div>
</form>
<p class="pb-1 text-muted"><small>Your email is safe with us. We won't spam.</small></p>
<div class="bottom-strip"></div>
</div>
</div>
</div>
</div>
<div class="modal fade text-center py-5 subscribeModal-lg" id="subscribeModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg" role="document">
<div class="modal-content">
<div class="modal-body">
<div class="top-strip"></div>
<a class="h2" href="https://www.fiverr.com/share/qb8D02" target="_blank">Sunlimetech</a>
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/***********************************************/
/***************** Packages ********************/
/***********************************************/
@import url('https://fonts.googleapis.com/css?family=Tajawal');
@import url('https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css');
#subscribeModal .modal-content{
overflow:hidden;
}
a.h2{
color:#007b5e;
margin-bottom:0;
text-decoration:none;
}
#subscribeModal .form-control {
height: 56px;
border-top-left-radius: 30px;
border-bottom-left-radius: 30px;
padding-left:30px;
}
#subscribeModal .btn {
border-top-right-radius: 30px;
border-bottom-right-radius: 30px;
padding-right:20px;
background:#007b5e;
border-color:#007b5e;
}
#subscribeModal .form-control:focus {
color: #495057;
background-color: #fff;
border-color: #007b5e;
outline: 0;
box-shadow: none;
}
#subscribeModal .top-strip{
height: 155px;
background: #007b5e;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
3
4
5
6
7
8
9
10
11
$(window).on('load', function() {
setTimeout(function(){
$('#subscribeModal').modal('show');
}, 5000);
setTimeout(function(){
$('.subscribeModal-lg').modal('show');
}, 10000);
});
$('#Reloadpage').click(function() {
location.reload();
});
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments:

Hi, where can I insert the code in these templates https://designmodo.com/bootstrap-templates/ ?

andrewder () - 4 years ago - Reply 0