I tried "$('#m') instanceof $",then I got false.
how do I know it is a zepto object?
I tried $(‘#m’) instanceof $ ,then I got false. how do I know it
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I just ran into this exact same problem while trying to use Zepto matchers for Jasmine. It seems like Zepto wraps objects using an internal Z function that is only accessible by the closure. I tried exposing it by mapping it to $.Z, which works
but it still doesn’t work with the matchers for some reason. I have created an issue on Zepto’s github, so hopefully it’s something that can be added in.