lity icon indicating copy to clipboard operation
lity copied to clipboard

Hanging on Loading when in mobile only

Open john-Graham opened this issue 7 years ago • 3 comments

I'm trying to sort out if I'm having a lity issue, a conflict or other. What's happening is when I load on mobile, I get the black background and the word loading but it hangs on there and the console is showing...

Uncaught TypeError: Cannot read property 'on' of undefined at new x (lity-min.js:5) at HTMLAnchorElement.y (lity-min.js:5)

specifically starting at: (.on("click","[data-lity-close]",

I'm on jQuery 1.12.1 so I'm not sure there's any dependency issues.

I have the page up and would be curious if you have any thoughts. https://www.edgewood.edu/admissions/freshman-students

john-Graham avatar Sep 05 '18 17:09 john-Graham

You're probably calling on() on a HTMLElement, not on a jQuery instance. You must ensure to wrap the element like $(element).on(...) instead of element.on(...).

jsor avatar Sep 06 '18 07:09 jsor

I'm not calling it programmatically, just added the data attribute.
<a href="https://www.youtube.com/watch?v=vR1hyPDep3U" data-lity> <div class="btn white">Meet Kourtni</div> </a>

Also tried <div class="btn white" data-lity data-lity-target="https://www.youtube.com/watch?v=vR1hyPDep3U">Meet Kourtni</div>

I'll try doing it programmatically and see if that makes a difference.

john-Graham avatar Sep 07 '18 14:09 john-Graham

Same issue when calling it through the console. Interestingly it's working on the newest Android OS and on iPhone if you do the force touch it will work. Baffling.

john-Graham avatar Sep 10 '18 13:09 john-Graham