forked from barbosamg/controleDeEstoquePHP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfooter.php
27 lines (25 loc) · 829 Bytes
/
footer.php
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
<script src="js/bootstrap.js"></script>
<script>
var url = window.location.href;
var navMenu = document.querySelector('#menu');
console.log(url.split('/'))
if(url.split('/')[6] === "cadastrar_produto.php"){
navMenu.children[1].classList.add("active")
}else{
navMenu.children[2].classList.add("active")
}
var alerta = document.querySelector('#alerta');
if(alerta){
var fadeEffect = setInterval(function () {
if (!alerta.style.opacity) {
alerta.style.opacity = 1;
}
if (alerta.style.opacity > 0) {
alerta.style.opacity -= 0.3;
} else {
clearInterval(fadeEffect);
alerta.style.display = "none";
}
}, 500);
}
</script>