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

  • SEARCH
  • Home
  • 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 6045997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T07:11:16+00:00 2026-05-23T07:11:16+00:00

I have a page with main tabs which behaves as follows; 1. On hover

  • 0

I have a page with “main tabs” which behaves as follows;
1. On hover of these, I show “sub tabs”
2. On click of any of the main tabs, it goes to one of the default sub tab pages.

$(".mainlink_href").mouseover(function(){...}

Now these behaves as expected on desktop browsers. But on the iPad, when user clicks on any of the main tabs, it always does the hover method execution i.e. shows the sub tabs and does not go the sub tabs page (as in the desktop)

Now I agree, that this is as per expected iPad behavior since there is no mouse cursor to track for hover event otherwise…

But is there any way that I can update the code such that “only for the iPad” it does not go through the hover method for the first click and instead does the click event and directly takes the user to the default sub tab page (i.e. similar to point 2 above in desktop browsers)

Please help me. Thank you.

  • 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-05-23T07:11:16+00:00Added an answer on May 23, 2026 at 7:11 am

    You could just assign both event handlers, and have the ontouchstart handler remove the onmouseover handler.

    $(".mainlink_href").mouseover(function(){...});
    $(".mainlink_href").ontouchstart(function(){this.mouseover=function(){};});
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page (main.php) which loads content from an external PHP file (rpc.php).
On my main page I have this jquery code which does an ajax call
I have an PHP/HTML main page, in which I include different other PHP files
I have a simple web page that has 3 tabs in my main content
I have a main page (main.html) which opens an iframe page (iframe.html).. The iframe
I have a single page site that utilizes tabs - It previously had one
I have a main page from where I am making a call to load
I have a page viewer as main window showing an external page as we
I am using jQuery for a simple website and have a main page 'index.html'
I'm trying to do blog application and I want main page to have this

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.