Issue with off-canvas menu functionality on iPhone 5

My client believes that the off canvas menu on my website is not functioning properly. Despite no errors appearing in the console, I am unable to test it myself as I do not own an iPhone or iPad. Would anyone be able to help troubleshoot this? View demo here

html:

<html>
    <body>  
        <div id="site-wrapper" class="container">
            <nav id="site-menu">
                <ul class="nav">
                    <li class="parent"><a class="accordian-toggle" href="#" >Item Parent</a>
                        <ul class="nav-child unstyled small">
                            <li><a href="#">Item</a></li>
                            <li><a href="#">Item</a></li>
                        </ul>
                    </li>
                    <li class="parent"><a class="accordian-toggle" href="#" >Item Parent</a>
                        <ul class="nav-child unstyled small">
                            <li><a href="#">Item</a></li>
                            <li><a href="#">Item</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>  
            <header id="header">
                <a class="brand" href="/">My Company</a><br />
            </header>
            <div id="site-canvas">
                <div id="mainbody">
                    <div class="container-fluid">
                        <p>main content</p>
                    </div>
                </div>
                <footer>
                    <p>footer</p>
                </footer>
            </div>
        </div>
    </body>
</html>

css/less:

header {
    position: fixed;
    top: 0;
    z-index: @z-index * 6;
    overflow: hidden;
    width: 100%;
    height: 65px;
}

#site-wrapper {
    .reset-box;
}

#mainbody {
    width: @100;
    margin: 65px auto 0;
}

#menuToggle {
    position: fixed;
        top: 15px; left: 0;
    z-index: @z-index * 7;
}


#menuButton {
    background-color: @black;
    margin: 0;
    padding: 0;
    height: 35px;
    width: 50px;
}

#menuButton:hover {background-color: @black-hover;}

#site-menu {
    background-color: @black;
    height: @100;
    position: fixed;
    top: 0; left: -340px;
    width: 330px;   
    z-index: @z-index * 5;  
}

#site-menu:after {z-index: @z-index * 7;}

#site-canvas {
    backface-visibility: hidden;
    height: @100;   
    transform: translateX(0);   
    transform: translate3d(0, 0, 0);    
    width: @100;
}

/********************************
/* OFF CANVAS MENU 
/*******************************/
.show-nav #site-canvas {
    transform: translateX(330px);   
    transform: translate3d(330px, 0, 0);
}

...

and last but not least the js:

/********************************
/* OFF CANVAS MENU
/*******************************/
$(document).ready(function(){
    var special = ['reveal'];
    $('.main-menu').click(function() {
        var transitionClass = jQuery(this).data('transition');
        if ($.inArray(transitionClass, special) > -1) {
            $('body').removeClass();
            $('body').addClass(transitionClass);
        } else {
            $('body').removeClass();
            $('#site-canvas').removeClass();
            $('#site-canvas').addClass(transitionClass);
        }
        $('#site-wrapper').toggleClass('show-nav'); 
        $('.main-menu i').toggleClass('fa-ellipsis-v fa-ellipsis-h');
        $('.main-menu div').toggle();
        return false;
    }); 
});

/********************************
/* OFF CANVAS MENU HEIGHT
/*******************************/
$(document).ready(function(){
    $('#site-canvas').css({'min-height':($(window).height())+'px'});
    $(window).resize(function(){
        $('#site-canvas').css({'min-height':($(window).height())+'px'});
    });
});

/********************************
/* NAV ACCORDIAN
/*******************************/
$(document).ready(function(){
    $('.accordian-toggle').click(function(){
            $('#site-menu .nav > .parent > .nav-child').slideUp();
            if(!$(this).next().is(':visible')){
                $(this).next().slideDown();
            }
    });
});

Answer №1

The issue I encountered was due to the absence of vendor prefixes...

/********************************
/* OFF CANVAS MENU 
/*******************************/
.show-nav #site-canvas {
    transform: translateX(-330px);      
    transform: translate3d(-330px, 0, 0);
    -webkit-transform: translateX(-330px);      
    -webkit-transform: translate3d(-330px, 0, 0);
    -ms-transform: translateX(-330px);      
    -ms-transform: translate3d(-330px, 0, 0);
}

.reveal #site-menu {
    transform: translateX(0);   
    transform: translate3d(0, 0, 0);
    -webkit-transform: translateX(0);   
    -webkit-transform: translate3d(0, 0, 0);    
    -ms-transform: translateX(0);   
    -ms-transform: translate3d(0, 0, 0);    
}
.reveal .show-nav #site-menu {
    transition: 900ms ease all;      
    transform: translateX(-330px);
    transform: translate3d(-330px, 0, 0);
    -webkit-transform: translateX(-330px);
    -webkit-transform: translate3d(-330px, 0, 0);   
    -ms-transform: translateX(-330px);
    -ms-transform: translate3d(-330px, 0, 0);   
}

.reveal .show-nav #site-canvas {
    transform: translateX(0);   
    transform: translate3d(0, 0, 0);
    -webkit-transform: translateX(0);   
    -webkit-transform: translate3d(0, 0, 0);
    -ms-transform: translateX(0);   
    -ms-transform: translate3d(0, 0, 0);
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

What is the best way to retrieve an input value and store it as a variable in AngularJS?

Is there a way to properly assign an input value to a variable in AngularJS without errors? Currently, I have a working test version on my page, but it involves using both JavaScript and jQuery alongside AngularJS. I'm looking for a cleaner solution w ...

Angular ng-repeat can sometimes lead to annoying flickering on the webpage

I have a code snippet that displays a list of thumbnails: <div class ="channel" ng-repeat ="channel in UIModel.channels" ng-class ="{evenchannel: ($index % 2) == 0, oddchannel: ($index % 2) == 1}"> <img class="channel-img" ng-src ="da ...

I am currently facing an issue with the error message "ReferenceError: items is not defined" and I am struggling to find a solution on how to properly test my data

Seeking assistance on adding jasmine taste to my factory code. Here is the snippet... ---dataService.js--- angular.module('angularAppApp') .factory('dataService', function($resource){ return $resource(`http://...:3100/posts/: ...

Performing a JSON POST Request: Steps for sending a POST request with JSON data format

I need to send the following data: { "contactsync": { "rev":4, "contacts":[ { "fields": [ { "value": { ...

Is there a way to create shared borders among Bootstrap columns?

Creating a Bootstrap container with two columns is my current task. The layout should display the columns side by side horizontally on larger screens, and stacked vertically on smaller screens with a 1px border surrounding each column, featuring rounded co ...

Question: How come I am receiving the error message "TypeError: Cannot read property 'toLowerCase' of undefined" in React JS?

Hi there, I'm new to this and trying to create a search filter. However, I keep encountering an error that says: Error: Cannot read property 'toLowerCase' of undefined It seems like the issue is related to the data type used with toLowerCa ...

The value of the Post Form Request Object is currently set as 'object Object'

Just delving into the world of Node.js and I have come across several questions here on SO in relation to this topic. However, the issue I am facing is that the request body always shows as { 'object Object' : ''} Here is the server-si ...

Is capturing a screenshot through PHP with mp4-upload feasible?

I recently implemented an upload function for videos on my website. The files are uploaded using jQuery and then processed on the server with PHP. On another page, I have all the videos displayed in a small "thumbnail" format. However, these are not tradi ...

Applying a class change in Vue.js upon mounting

How can I make a button element with a .hover property trigger the hover animation as soon as the page loads? I want to apply a class to the button when the page is mounted and then remove it later. What is the best approach for this? I considered using a ...

Encountered a problem when attempting to display a video file from Firebase with the use of MongoDB and EJS

I am attempting to create a YouTube clone app using Node, Express, Mongoose, and EJS. However, I encountered an error when trying to use res.render() to send results to the iframe in the EJS file. Below is the code for both the EJS and server files:- ind ...

Why does async return an empty array the first time it is used?

I'm currently developing a JavaScript application using Node.js. I have been experimenting with the async/await function. After running the code snippet below, I noticed that the first time I send a GET request, I receive an empty array. However, if ...

Struggling with showcasing Trips in my React Native project and looking for guidance on the best approach to implement it beautifully

API: app.get('/trip', async (req, res) => { try { const employeeId = req.query.user; const empId = new ObjectID(employeeId); // Retrieving Fleet associated with the driver's ID const fleet = await Fleet.findOne({ a ...

The Vue component fails to respond to updates in plugin data

I am currently working on implementing a feature where a component reacts to data changes in a custom Vue plugin. To achieve this, the plugin creates a new instance of a Vue object in its constructor: this._vm = new Vue({ data: { obj: null, stat ...

Modify File Name with Fine Uploader: Personalize Your File Titles

When attempting to save files with a specific directory structure in my S3 bucket, I am encountering an issue where the getName method only returns the reference instead of the actual value of the file name. The output of getName is displayed as [object O ...

Determine the combined width of each child element and divide it by two

I am working on a div that has multiple children inside. To achieve a horizontal layout, I need to set a width on the parent div so that the content flows from left to right. Instead of having all items in one row, I want them to be split into two rows. Th ...

Vue - Child component not refreshing its data and triggering a re-render

In this scenario, I have the ability to upload a single LiteratureReview which can contain multiple Quote components. Essentially, I am dealing with parent-child relationships between LiteratureReview and Quote. Data retrieval and submission are done using ...

Guide to customizing margins at specific breakpoints in Bootstrap 4 without using javascript

Despite exploring numerous solutions and trying them out, I have yet to achieve the desired results. I am looking to customize margins for various breakpoints in Bootstrap. For example: View for laptops, Tablet view The issue may be related to defined w ...

Update the react component's state props to trigger a re-render when the state changes

I'm facing an issue with getting a component to rerender in React even though one of its components is a piece of state that receives updates. The piece of state in question is 'board': const [board, setBoard] = useState("") The component i ...

Error in Developer Console: Incorrect CSS Selector Output

While using the developer console in Firefox or Chrome, I noticed that when typing $('a'), it does not always return an array of all the links on a page as expected. Strange enough, sometimes it only returns a single a element instead of multiple ...

Retrieving a section of the web address from a provided URL

Similar Question: Extract part of URL How do I extract a specific part of a URL from a complete URL string? For example, given this URL: http://<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="9df8e5fcf0edf1f8dde8eff1b3fef ...