Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8538301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T11:06:08+00:00 2026-06-11T11:06:08+00:00

jQuery(document).ready(function(){ /* for top navigation */ jQuery(#menu ul, #menu li).css(-webkit-transform, translateZ(0)); jQuery( #menu ul

  • 0
jQuery(document).ready(function(){
    /* for top navigation */

    jQuery("#menu ul, #menu li").css("-webkit-transform", "translateZ(0)");
    jQuery(" #menu ul ").css({display: "none"}); // Opera Fix
    jQuery(" #menu li").hover(function(){
        jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(400);
    },function(){
        jQuery(this).find('ul:first').css({visibility: "hidden"});
    });

    jQuery(" #menu2 ul ").css({display: "none"}); // Opera Fix
    jQuery(" #menu2 li").hover(function(){
        jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(400);
    },function(){
        jQuery(this).find('ul:first').css({visibility: "hidden"});
    });
});

This code is from dropdown.js and is for my nav menu on http://www.yorkshirephotographer.net
I had to add the top line of code – webkit transform due to the menu not functioning correctly on Mac’s and IPAD’s.
See more about this and why I added this code line here –

JavaScript dropdown menu – parts disappearing on a Mac?

But now the menu doesn’t work on Mobile devices. When you tap to click, a box appears for a second but under the main menu text, like your pressing under the link, which results in the link not activating – so basically the menu bar doesnt work on mobiles.

I’ve checked without that line of code and it works again, but it wont work on a Mac….so Need to disable it on mobile devices or only read when its Mac/Apple OS…..

Please help
Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T11:06:08+00:00Added an answer on June 11, 2026 at 11:06 am

    You may try this:

    jQuery(document).ready(function(){
    
        // If Mac, or iPad, apply the following...
        if(navigator.userAgent.match(/(Mac|iPad)/i)) {
    
            jQuery("#menu ul, #menu li").css("-webkit-transform", "translateZ(0)");
            jQuery(" #menu ul ").css({display: "none"}); // Opera Fix        
            jQuery(" #menu li").hover(function(){
                jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(400);
            },function(){
                jQuery(this).find('ul:first').css({visibility: "hidden"});
            });
    
            jQuery(" #menu2 ul ").css({display: "none"}); // Opera Fix
            jQuery(" #menu2 li").hover(function(){
                jQuery(this).find('ul:first').css({visibility: "visible",display: "none"}).slideDown(400);
            },function(){
                jQuery(this).find('ul:first').css({visibility: "hidden"});
            });
    
        } // End of Mac, iPad additional fixes ----
    
    });
    

    PS: If you want to include your additional fixes for the the iPhone, and iPod, you may replace if(navigator.userAgent.match(/(Mac|iPad)/i)) with if(navigator.userAgent.match(/(Mac|iPhone|iPod|iPad)/i))

    Hope this helps, let me know about your results mate.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a jQuery menu that is represented with these paramaters: <script type=text/javascript> jQuery(document).ready(function(){
The following java-script is working fine (Jquery) $(document).ready(function(){ $('#c_area').load($('.m_top:first').attr('href')) }); $('.m_top').click( function(){ $(#myDiv).html('<img src=images/loading.gif
jQuery(document).ready(function(){ $(#button).submit(function() { { var email_id=document.getElementById('textfield').value; var password=document.getElementById('textfield2').value; var utype=document.getElementById(utype).value; var url=login_check.jsp?&email_id=+encodeURIComponent(email_id)+&password=+encodeURIComponent(password)+&utype=+encodeURIComponent(utype); $('form').get(0).setAttribute('action',url); alert(document.form1.action);
On document ready I run this code: jQuery(document).ready(function(){ jQuery('#button').click(function() { jQuery('#contact_form').load(/Users/mge/Downloads/jquery-ajax-1/readme.txt); return false; });
load.js: jQuery(document).ready(function($) { $('.dialog ul li').click(function(e) { switch($(this).attr('id')) { case 'addProject': $('.addDialog').load('/add/addprojectform'); break; case
I am using a jQuery Class plugin as so : jQuery(document).ready(function($) { window.SSK.calendar =
I was hoping someone could help me with the following script: jQuery(document).ready(function($) { $(.infoBoxBtn
This is my jQuery code <script type=text/javascript> jQuery(document).ready(function($){ $(#'.$tag.').dcFlickr({ limit: '.$nFlickr.', style: thumb, q:
<script type=text/javascript> jQuery(document).ready(function(){ setTimeout(function(){ jQuery('.my-image').each(function(){ jQuery(this).greyScale({ fadeTime: 200, reverse: false }); $(this).animate({ 'opacity' :
I am using the KendoUi Slider. I'm using the following setings: jQuery(document).ready(function () {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.