iOS automatic hover fix?

前端 未结 8 708
春和景丽
春和景丽 2020-12-04 17:01

Is there a jQuery plugin or JavaScript script that automagically loops through each CSS hover (found in an external stylesheet) and binds it with a double touchdown event?

8条回答
  •  情话喂你
    2020-12-04 17:37

    Try this:

    
    
    
        iPad Experiment
        
        
        
    
        Google
        stackoverflow.com
    
    
    

    ... or check out the demo on my web site. Note that it's set up to only work its magic on the iPad - detecting all versions of the iOS is another question in my books ;)

    It works on the basis of the fact that...

    After you click a link on the iphone or ipad, it leaves a simulated mouse hover that triggers the a:hover css styling on that link. If the link has a javascript handler that keeps you on same page, the hover state will not change until you click on another link.

    Citation: Safari iphone/ipad “mouse hover” on new link after prior one is replaced with javascript

提交回复
热议问题