I was told that the mobile menu on my page (accessible through 3 horizontal bars in the upper right corner) does not close on the iPhone, I can’t check myself because I don’t have Apple devices (it works on iPhone simulators), but I I don’t understand why it will work on Android and not on iPhone.
Here's the JS code controlling the mobile menu:
$( '#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();
});
source
share