Search code examples
jqueryjquery-mobilejqtouch

jQtouch with jQuery not Zepto


I'm not sure why but I followed instructions below to use jQuery instead of Zepto but it comes with jQTouch object not found error.

<script src="../../src/lib/zepto.min.js" type="text/javascript" charset="utf-8"></script>
        <script src="../../src/jqtouch.min.js" type="text/javascript" charset="utf-8"></script>
        <!-- Uncomment the following two lines (and comment out the previous two) to use jQuery instead of Zepto. -->
        <!-- <script src="../../src/lib/jquery-1.7.min.js" type="application/x-javascript" charset="utf-8"></script> -->
        <!-- <script src="../../src/jqtouch-jquery.min.js" type="application/x-javascript" charset="utf-8"></script> -->

It seems like developer asked to uncomment below and comment above if I wanted to use jQuery but it doesn't seem to work at all?

Anyone got jQuery working with this?

The reason is I need to use jQuery UI.


Solution

  • I had the same problem and solved it with a little trial and error. It turns out that the instruction "Uncomment the following two lines (and comment out the previous two) to use jQuery instead of Zepto" is inaccurate.

    Instead, of commenting out the previous two, just comment out the zepto.min.js line and leave the jqtouch.min.js line as-is. It seems to be working fine for me now.