We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 57cfae0 commit ee69503Copy full SHA for ee69503
src/wp-content/themes/twentyfourteen/js/functions.js
@@ -130,6 +130,13 @@
130
el.siblings( '.focus' ).removeClass( 'focus' );
131
}
132
} );
133
+
134
+ // Close open sub-menus when clicking outside.
135
+ $( document.body ).on( 'touchstart.twentyfourteen', function( e ) {
136
+ if ( ! $( e.target ).closest( '.menu-item-has-children, .page_item_has_children' ).length ) {
137
+ $( '.focus' ).removeClass( 'focus' );
138
+ }
139
+ } );
140
141
142
0 commit comments