Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working Example with Zepto? #178

Closed
hireclix opened this issue Jun 22, 2018 · 3 comments
Closed

Working Example with Zepto? #178

hireclix opened this issue Jun 22, 2018 · 3 comments

Comments

@hireclix
Copy link

Is there a working example using Zepto instead of jQuery? I've been unsuccessful in getting this to work.

@jsor
Copy link
Owner

jsor commented Jul 7, 2018

Could you give a bit more infos about what exactly isn't working?

@bendytree
Copy link

Same here - when I use zepto I get this error when I click to open the modal:

Uncaught TypeError: b.when is not a function
    at new x (lity.min.js:5)
    at HTMLAnchorElement.y (lity.min.js:5)
    at HTMLDocument.l (zepto.min.js:2)
    at HTMLDocument.a.proxy (zepto.min.js:2)

Here's my setup that doesn't work:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lity/2.3.1/lity.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.2.0/zepto.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lity/2.3.1/lity.min.js"></script>

But this works:

<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/lity/2.3.1/lity.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/lity/2.3.1/lity.min.js"></script>

My markup is...

<a data-lity href="//www.youtube.com/watch?v=ALK7pdBaBBY"><img src="./thumb.jpg" /></a>

I'm fine using jQuery, just posting in case it helps troubleshoot.

@jsor
Copy link
Owner

jsor commented Apr 18, 2019

Zepto needs additional modules, check the README.

@jsor jsor closed this as completed Apr 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants