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 680adc3 commit 1922bd9Copy full SHA for 1922bd9
src/wp-content/themes/twentyfourteen/js/functions.js
@@ -100,6 +100,13 @@
100
* @see trac ticket #30575
101
*/
102
function touchDropdown() {
103
+ var navMenus = $( '.primary-navigation, .secondary-navigation' );
104
+
105
+ // Check if menus exist before proceeding.
106
+ if ( ! navMenus.length ) {
107
+ return;
108
+ }
109
110
if ( 783 > _window.width() ) {
111
$( '.primary-navigation, .secondary-navigation' ).find( 'a' ).on( 'focus.twentyfourteen blur.twentyfourteen', function() {
112
$( this ).parents().toggleClass( 'focus' );
0 commit comments