javascript – 移动菜单未在iPhone上关闭

我被告知在iPhone上没有关闭
the mobile menu on my page(可通过右上方的3个水平条图标访问).我无法检查自己,因为我没有Apple设备(在线iPhone模拟器上它确实有效)但我不明白为什么它可以在Android而不是在iPhone上运行.

这是控制移动菜单的JS代码:

$( '#mobile_menu_icon' ).click(function() {
    if( $( '.mobile_header_menu' ).css( 'right' ) == '-280px' ) { 
        $( '.mobile_header_menu' ).animate( { right: '0' }, open_delay, 'easeInOutExpo' );  
        $( '#wrap' ).animate({ right: '280px' }, open_delay, 'easeInOutExpo' );
        $( 'body' ).addClass( 'overflow_hidden' );
    }
    else { 
        $( '.mobile_header_menu' ).animate({ right: '-280px' }, close_delay, 'easeInOutExpo' );
        $( '#wrap' ).animate({ right: '0' }, close_delay, 'easeInOutExpo' );    
        $( 'body' ).removeClass( 'overflow_hidden' );
    }
    return false;
});
$( document, '.mobile_header_menu_close' ).click(function() {
    if( $( '.mobile_header_menu' ).css( 'right' ) == '0px' ) {
        $( '.mobile_header_menu' ).animate({ right: '-280px' }, close_delay, 'easeInOutExpo' );
        $( '#wrap' ).animate({ right: '0' }, close_delay, 'easeInOutExpo' );
        $( 'body' ).removeClass( 'overflow_hidden' );   
    }
});
$( '.mobile_header_menu_inner' ).click(function( event ) {
    event.stopPropagation();
});

最佳答案 我删除了以下部分并且它有效.不明白为什么它在iPhone上有问题.

$( '.mobile_header_menu_inner' ).click(function( event ) {
    event.stopPropagation();
});
点赞