Created
July 10, 2020 16:26
-
-
Save dsebao/c4e473e7d6da5f862bc22bb7cd12427a to your computer and use it in GitHub Desktop.
Add Btn
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Este es el javascript del boton | |
function addBtnDirector(){ | |
<sccript> | |
let btn = document.querySelector('a.btndirectors'); | |
btn.addEventListener('click',function(e){ | |
e.preventDefault(); | |
let nav = document.querySelector('ul.masonry-filter'); | |
nav.classList.toggle('mostrar'); | |
}); | |
</script> | |
} | |
add_action('wp_footer','addBtnDirector',10); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Aca el CSS para ocultar | |
.mostrar{ | |
display:block; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="#" class="btndirectors" style=" | |
color: #131313; | |
font-weight: 700; | |
border: 3px solid #111; | |
padding: 10px 28px; | |
margin: 10px 0; | |
display: inline-block; | |
"> + Show Directors</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment