HTML
x
1
<!--Navbar-->
2
<nav class="navbar navbar-light amber lighten-4 mb-4">
3
4
<!-- Navbar brand -->
5
<a class="navbar-brand" href="#">SAN MIGUEL DE VICHAYCOCHA - HUARAL</a>
6
7
<!-- Collapse button -->
8
<button class="navbar-toggler first-button" type="button" data-toggle="collapse" data-target="#navbarSupportedContent20"
9
aria-controls="navbarSupportedContent20" aria-expanded="false" aria-label="Toggle navigation">
10
<div class="animated-icon1"><span></span><span></span><span></span></div>
11
</button>
CSS
x
1
/* Icon 1 */
2
3
.animated-icon1, .animated-icon2, .animated-icon3 {
4
width: 30px;
5
height: 30px;
6
position: relative;
7
margin: 0px;
8
transform: rotate(0deg);
9
transform: rotate(0deg);
10
transform: rotate(0deg);
11
transform: rotate(0deg);
JS
x
1
$(document).ready(function () {
2
3
$('.first-button').on('click', function () {
4
5
$('.animated-icon1').toggleClass('open');
6
});
7
$('.second-button').on('click', function () {
8
9
$('.animated-icon2').toggleClass('open');
10
});
11
$('.third-button').on('click', function () {
12
13
$('.animated-icon3').toggleClass('open');
14
});
15
});