A tag added: hover, you need to click on iOS 2 times to jump

Source: Internet
Author: User

Recently found to do before the site has a bug on the mobile side, I put the tab on the PC hover style, but in the iOS mobile side to see the effect, because the added hover need to click 2 times, the first click is to add hover style tab, the second click a tag to jump

Because the site is not responsive, but also requires the mobile can be normal browsing, so my solution is: the hover style with JS instead of CSS, and then determine whether the mobile side or only to determine the cancellation of hover events iOS. Finally the perfect solution.

PS: In the help degree Niang, see if your site is responsive can be resolved using the following methods:

(1) Page header add meta

<metaName="viewport"content="Width=device-width, initial-scale=1"/> 

(2) Use JS to change the href to window.location

$(A).On( ' click Touchend ' , function  (e)  {var El = $ ( this);  var link = Elattr ( ' href '  window< Span class= "pun". location = Link;                 

To try it out for myself, this kind of scheme is feasible.

A tag added: hover, you need to click on iOS 2 times to jump

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.