Getting Zepto undefined error when using it in a page. How to resolve this?

227 Views Asked by At

I am running a script on a page where I include my zepto.min.js file first and then use it.

I get Zepto undefined error. Here is a code snippet:

<script type="text/javascript" src="path/to/my/website/zepto.min.js"></script>
var Zepto;
Zepto = window.Zepto;

main();
function main() {
    Zepto(document).ready(function($) {
    // My function to do things
}

When I call this I am getting Undefined error. Any idea to resolve this?

0

There are 0 best solutions below