"button info"
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
31
32
33
34
35
36
37
<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 ---------->
<div class="absCenter">
<button class="infoButton">
<div class="infoButton-btn">
<span class="infoButton-btn-text">i</span>
</div>
<div class="infoButton-container">
<div class="infoButton-container-message">This is a message about the thing that you need to know.</div>
</div>
</button>
</div>
<script>
// JS for thumbnail presentation only
let mouseMoved = false;
const button = document.querySelector('.infoButton');
const mouseMoveHandler = event => {
clearInterval(loop);
document.onmousemove = null;
button.classList.remove('infoButton_isActive');
};
const toggleHandler = event => {
const classes = button.classList;
if (classes.contains('infoButton_isActive')) {
classes.remove('infoButton_isActive');
} else {
classes.add('infoButton_isActive');
}
}
document.onmousemove = mouseMoveHandler;
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
@import url("https://fonts.googleapis.com/css?family=Montserrat:400,700");
body {
font-family: 'Montserrat', sans-serif;
font-weight: 400;
background-color: #F6F6F6;
height: 100vh;
}
*:focus {
outline: none;
}
.absCenter {
position: absolute;
top: 50%;
left: 50%;
-webkit-transform: translate(-50%, -50%);
transform: translate(-50%, -50%);
}
.infoButton {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
border: 0;
background-color: transparent;
padding: 0;
margin: 0;
font-size: 14px;
position: relative;
}
.infoButton-btn {
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background-color: transparent;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Related: See More


Questions / Comments: