"modal"
Bootstrap 3.0.0 Snippet by evarevirus

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
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css">
<script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script>
<script src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<!------ Include the above in your HEAD tag ---------->
<h1>Modal Experiments</h1>
<button class='tilt-btn'>Tilt Up</button>
<button class='zoom-btn'>Zoom In</button>
<div class='cover hidden'></div>
<div class='modal hidden'>
<div class='content'>
<p>Hey There</p>
</div>
</div>
<script>
$("button.tilt-btn").on ("click", function() {
$('.modal, .cover').removeClass("hidden");
$('.modal').addClass("tiltup");
});
$("button.zoom-btn").on ("click", function() {
$('.modal, .cover').removeClass("hidden");
$('.modal').addClass("zoom");
});
//hide modal
$(".cover, .close").on ("click", function() {
$('.modal').attr('class', 'modal');
$('.modal, .cover').addClass("hidden");
});
</script>
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
body, h1 {
font-family: sans-serif;
text-align: center;
overflow: hidden;
background-color: #ddd;
color: #333;
}
.cover {
z-index: 1;
position: fixed;
height: 100%;
width: 100%;
background-color: #333;
top: 0;
left: 0;
opacity: .9;
}
.modal {
z-index: 2;
height: 200px;
width: 300px;
background-color: #26C1DD;
border-radius: 5px;
text-align: center;
border-top: solid 3px #157688;
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
margin: auto;
}
.modal .content p {
font-size: 2em;
color: #fff;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: