|
|
Line 138: |
Line 138: |
| <!-- JS code --> | | <!-- JS code --> |
| <script src="https://2018.igem.org/Team:UPF_CRG_Barcelona/scripts?action=raw&ctype=text/javascript" charset="utf-8" type="text/javascript"></script> | | <script src="https://2018.igem.org/Team:UPF_CRG_Barcelona/scripts?action=raw&ctype=text/javascript" charset="utf-8" type="text/javascript"></script> |
− | <script src="https://2018.igem.org/Team:UPF_CRG_Barcelona/devel?action=raw&ctype=text/javascript" charset="utf-8" type="text/javascript"></script>
| |
− | <script src="https://2018.igem.org/Team:UPF_CRG_Barcelona/plotly?action=raw&ctype=text/javascript" charset="utf-8" type="text/javascript"></script>
| |
| <script> | | <script> |
| // Initialize Swiper | | // Initialize Swiper |
Line 182: |
Line 180: |
| }, | | }, |
| }); | | }); |
− | document.addEventListener('DOMContentLoaded', function () {
| |
− |
| |
− | // Get all "navbar-burger" elements
| |
− | var $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
| |
− | // Check if there are any navbar burgers
| |
− | if ($navbarBurgers.length > 0) {
| |
− | // Add a click event on each of them
| |
− | $navbarBurgers.forEach(function ($el) {
| |
− | $el.addEventListener('click', function () {
| |
− | // Get the target from the "data-target" attribute
| |
− | var target = $el.dataset.target;
| |
− | var $target = document.getElementById(target);
| |
− | // Toggle the class on both the "navbar-burger" and the "navbar-menu"
| |
− | $el.classList.toggle('is-active');
| |
− | $target.classList.toggle('is-active');
| |
− | });
| |
− | });
| |
− | }
| |
− | });
| |
| </script> | | </script> |
| </body> | | </body> |
| </html> | | </html> |