0

recently my drop down categories have started to not show on mobile devices once clicked. they seem to go straight to the actual page titled and not show my drop down categories. (mikesnature.com) they used to work but now don't, is their anything I can do to fix this?

Mike

  • This seems to be a javascript problem , please provide more information , check your browser's console for any errors, especially when clicking on the navigation link or button – Amin Nov 27 '17 at 22:17
0

This isn't necessarily an answer, but you have a Javascript error.

// listen for postMessage events from the notifications iframe
$( window ).on( 'message', function( e ) {
    var event = ! e.data && e.originalEvent.data ? e.originalEvent : event;
    if ( event.origin !== 'https://widgets.wp.com' ) {
        return;
    }

    var data = ( 'string' === typeof event.data ) ? parseJson( event.data, {} ) : event.data;
    if ( 'notesIframeMessage' !== data.type ) {
        return;
    }

    var eventData = notesTracksEvents[ data.action ];
    if ( ! eventData ) {
        return;
    }

    recordTracksEvent( eventData( data ) );
} );

It's erroring out on this line specifically (event.origin is not defined), so it looks like event is not always an actual event. You should have some type-checking in place. I think this is probably happening before your menu JS kicks in, so it's not actually running properly.

if ( event.origin !== 'https://widgets.wp.com' ) {
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.