Syncing with dev branch

This commit is contained in:
Braad
2015-04-21 12:05:22 -07:00
parent 9de3310f11
commit 6d34078f94
24 changed files with 4150 additions and 162 deletions
+9 -7
View File
@@ -27,7 +27,7 @@ jQuery( document ).ready( function( $ ) {
$( 'li:first-child' ).addClass( 'first' );
$( 'ul, ol' ).parent( 'li' ).addClass( 'parent' );
// Mobile header toggle buttons
// Create mobile header toggle buttons
$( '.site-header .title-area' ).after( '<div class="toggle-buttons" />' );
$( '.site-header .widget-area, .nav-primary' ).each( function( i ) {
@@ -58,7 +58,7 @@ jQuery( document ).ready( function( $ ) {
$target.addClass( 'toggle-target-' + i );
});
// Toggle widget areas and primary nav
// A widget areas and primary nav mobile toggle functionality
$( '.site-header .toggle-button' ).click( function( event ) {
// Prevent default behavior
@@ -70,11 +70,9 @@ jQuery( document ).ready( function( $ ) {
// Get toggle button that was clicked
$button = $( this );
//Remove focus
$button.blur();
// Match the button to the right target
$target = $( '.toggle-target-' + $button.attr( 'id' ).match( /\d+/ ) );
console.log( 'Target: ' + $target.attr('class'));
// Toggle buttons
$button.toggleClass( 'open' );
@@ -82,7 +80,11 @@ jQuery( document ).ready( function( $ ) {
// Toggle targets
$target.toggleClass( 'open' );
$( '[class^="toggle-target"]' ).not( $target ).removeClass( 'open' );
$( '[class*="toggle-target"]' ).not( $target ).removeClass( 'open' );
// Remove focus
$button.blur();
});
// Mobile navigation icons
@@ -137,4 +139,4 @@ jQuery( document ).ready( function( $ ) {
});
}); /* end of page load scripts */
}); /* end of page load scripts */