Skip to content

Links not working inside <li> #4

Open

Description

I'm looking for help as I'm stuck with links not working on mobile device (Safari, iPhone at least).

I'm looking to add links inside each cards ( < a > inside each li element).
It seems to work on a computer, but not on a mobile device. The link is shown, you can tap it (click) but it doesn't send you to the destination, it's like it's not working.

I guess it's from the CSS animation or maybe modernizr but I'm really not an expert and I need your help !

Here is a link to the pen : https://codepen.io/imromain/pen/gwdRzo

Activity

  1. adenadoume commented on Oct 16, 2016

    @adenadoume

    Yup, am having exact same issue, trying to figure out how to make link work on touch devices...

    Preparing coffee and going for a long night I guess :)

    From my little knowledge I believe it has to do with a touchstart event setting the zindex property, link is in background in touch devices..

    Any help much appreciated, amzing script btw :)

  2. abinktidars commented on May 5, 2017

    @abinktidars

    yes, i was used "On Touch Event" in jquery ui can solving the problem to give links in stack (li)

  3. alexscloh commented on Nov 1, 2017

    @alexscloh

    any solution to fix it? i need a click link in each card

  4. talifa commented on Jul 26, 2018

    @talifa

    any idea?

  5. OneHedgehog commented on Aug 1, 2018

    @OneHedgehog

    Workaround: To add redirect on touchevent

    Smth like this. Elem is your link in dom

    elem.addEventListener("touchend",()=> { window.location.href = "https://www.google.com.ua" });

  6. OneHedgehog commented on Aug 1, 2018

    @OneHedgehog
  7. talifa commented on Aug 2, 2018

    @talifa

    Unfortunately, the bug is still there.

  8. weirdo-o commented on Aug 2, 2018

    @weirdo-o

    同样的问题,求大神解救

  9. weirdo-o commented on Aug 2, 2018

    @weirdo-o

    给需要跳转的元素添加了touchend以后,滑动的时候碰到元素就会触发跳转,用户体验很差啊

  10. OneHedgehog commented on Aug 3, 2018

    @OneHedgehog

    The prev version of my workaround have some troubles. When you put some tags inside a tag, the target element is the last child tag. And, if it isn't a link, it obviosly doesn't have a href attr, so our redirect didn't work

    Finally fix it in my next pull req:
    https://github.com/codrops/ElastiStack/pull/13/files

  11. talifa commented on Aug 10, 2018

    @talifa

    @OneHedgehog спааааааасибоооу

  12. OneHedgehog commented on Aug 11, 2018

    @OneHedgehog

    It seems like that issue can be closed :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions