Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c043342

Browse files
authored
Merge pull request #62 from aledruetta/master
Merge devel
2 parents 720625a + 9883a49 commit c043342

File tree

6 files changed

+262
-169
lines changed

6 files changed

+262
-169
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ requirements-dev.txt
1010
node_modules/
1111
*.log
1212
*.egg-info/
13+
tilix.json
1 KB
Loading
1.31 KB
Loading

prototipo/projeto/static/script.js

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
$(function() {
2+
3+
// Get all "navbar-burger" elements
4+
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
5+
6+
// Check if there are any navbar burgers
7+
if ($navbarBurgers.length > 0) {
8+
9+
// Add a click event on each of them
10+
$navbarBurgers.forEach( el => {
11+
el.addEventListener('click', () => {
12+
13+
// Get the target from the "data-target" attribute
14+
const target = el.dataset.target;
15+
const $target = document.getElementById(target);
16+
17+
// Toggle the "is-active" class on both the "navbar-burger" and the "navbar-menu"
18+
el.classList.toggle('is-active');
19+
$target.classList.toggle('is-active');
20+
21+
});
22+
});
23+
}
24+
25+
});

0 commit comments

Comments
 (0)