This file contains 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( window, $, undefined ) { | |
'use strict'; | |
$( 'nav' ).before( '<button class="c-hamburger c-hamburger--htx" role="button" aria-pressed="false"><span>toggle menu</span></button>' ); // Add toggles to menus | |
$( 'nav .sub-menu' ).before( '<button class="sub-menu-toggle" role="button" aria-pressed="false"></button>' ); // Add toggles to sub menus | |
// Show/hide the navigation | |
$( '.c-hamburger, .sub-menu-toggle' ).on( 'click', function() { | |
var $this = $( this ); | |
$this.attr( 'aria-pressed', function( index, value ) { |
This file contains 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
.c-hamburger--htx { | |
background-color: #ff3264; | |
} | |
.c-hamburger--htx span { | |
transition: background 0s 0.3s; | |
} | |
.c-hamburger--htx span::before, | |
.c-hamburger--htx span::after { |
This file contains 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
.c-hamburger { | |
display: block; | |
position: relative; | |
overflow: hidden; | |
margin: 0; | |
padding: 0; | |
width: 96px; | |
height: 96px; | |
font-size: 0; | |
text-indent: -9999px; |
This file contains 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 | |
//* Load Font Awesome | |
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' ); | |
function enqueue_font_awesome() { | |
wp_enqueue_style( 'font-awesome', '//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css' ); | |
} |
This file contains 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
[code snippet] |