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
| const menuBtn = document.querySelector('.menu-btn'); | |
| let menuOpen = false; | |
| menuBtn.addEventListener('click', () => { | |
| if(!menuOpen) { | |
| menuBtn.classList.add('open'); | |
| menuOpen = true; | |
| } else{ | |
| menuBtn.classList.remove('open'); | |
| menuOpen = false; |
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
| function toggle(){ | |
| var button = document.getElementById('btn-toggle'); | |
| button.classList.toggle('active'); | |
| } |
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
| <button id=""btn-toggle" onclick="toggle()">Button</button> |
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
| <?php | |
| // ========================================================================= | |
| // GENESIS LOOP FOR CUSTOM POST TYPE | |
| // ========================================================================= | |
| function custom_loop_with_pagination() {?> | |
| <article class="page type-page entry"> | |
| <header class="entry-header"> | |
| <h1 class="entry-title"><?php the_title(); ?></h1> | |
| </header> | |
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
| <?php | |
| if( $terms = get_terms( array( | |
| 'taxonomy' => 'YOUR_TAXONOMY', | |
| 'orderby' => 'name' | |
| ) ) ) : ?> | |
| <ul class="faq-filter"> | |
| <li><a href="">All</a></li> | |
| <?php foreach ( $terms as $term ) : ?> | |
| <li><a id="faq-filter-id-<?php echo $term->term_id; ?>" href=""><?php echo $term->name; ?></a></li> | |
| <?php endforeach; ?> |
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
| jQuery('.YOUR_CLASS').on('click', function() { | |
| jQuery('.YOUR_CLASS').removeClass('active'); | |
| jQuery(this).addClass('active'); | |
| }); |
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
| <?php //don't copy the opening php tag | |
| // ============================================================= | |
| // DEFINE CONSTANTS | |
| // ============================================================= | |
| define('THEME', get_stylesheet_directory_uri()); | |
| // ============================================================= | |
| // ENQUEUE SCRIPTS | |
| // ============================================================= |
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
| var btn = document.getElementById('button'); | |
| btn.addEventListener('click', loadText); | |
| function loadText(){ | |
| console.log('button clicked'); | |
| } |
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
| var btn = document.getElementById('button'); | |
| btn.addEventListener('click', loadText); | |
| function loadText(){ | |
| //Create XHR Object | |
| var xhr = new XMLHttpRequest(); | |
| //OPEN - type, url/file, async |
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
| var btn = document.getElementById('button'); | |
| btn.addEventListener('click', loadText); | |
| function loadText(){ | |
| //Create XHR Object | |
| var xhr = new XMLHttpRequest(); | |
| //OPEN - type, url/file, async |