Twenty Fifteen: keep sub-menus open when visiting sub-menu pages, to show context when navigating a site.

Props jartes, fixes #30722.
Built from https://develop.svn.wordpress.org/trunk@31214


git-svn-id: http://core.svn.wordpress.org/trunk@31195 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Lance Willett 2015-01-16 19:17:22 +00:00
parent b8dd1f9c69
commit f6fd49b357
2 changed files with 5 additions and 1 deletions

View File

@ -13,6 +13,10 @@
// Add dropdown toggle that display child menu items. // Add dropdown toggle that display child menu items.
$( '.main-navigation .menu-item-has-children > a' ).after( '<button class="dropdown-toggle" aria-expanded="false">' + screenReaderText.expand + '</button>' ); $( '.main-navigation .menu-item-has-children > a' ).after( '<button class="dropdown-toggle" aria-expanded="false">' + screenReaderText.expand + '</button>' );
// Toggle buttons and submenu items with active children menu items.
$( '.main-navigation .current-menu-ancestor > button' ).addClass( 'toggle-on' );
$( '.main-navigation .current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' );
$( '.dropdown-toggle' ).click( function( e ) { $( '.dropdown-toggle' ).click( function( e ) {
var _this = $( this ); var _this = $( this );
e.preventDefault(); e.preventDefault();

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.2-alpha-31213'; $wp_version = '4.2-alpha-31214';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.