jQuery Icon Logo
me@grafxflow

Written by me@grafxflow

06 Mar, 2013

0

4,209

jQuery Can't find variable: $ error on iPad FIX

I had been testing a website on an iPad and started getting the error message:

Can't find variable: $

This was strange since I had tested the website on all the popular browsers (Internet Explorer, Firefox, Chrome, Safari etc) on my laptop and it was working just fine. So what was causing the iPad to show this error and functionality issue?

 The Solution:

It turned out that I needed to bring in the jQuery file above all the other javascript files.

So changed:

<script type="text/javascript" src="js/jquery-function1.js"></script>
<script type="text/javascript" src="js/jquery-latest.min.js"></script>
<script type="text/javascript" src="js/jquery-function2.js"></script>

to...

<script type="text/javascript" src="js/jquery-latest.min.js"></script>
<script type="text/javascript" src="js/jquery-function1.js"></script>
<script type="text/javascript" src="js/jquery-function2.js"></script>

Add comment

Smart Search

131 Following
57 Followers

me@grafxflow

Hull, United Kingdom

I am a Full-stack Developer who also started delving into the world of UX/UI Design a few years back. I blog and tweet to hopefully share a little bit of knowledge that can help others around the web. Thanks for stopping by!

Follow