jQuery Icon Logo
me@grafxflow

Written by me@grafxflow

06 Mar, 2013

0

5,736

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>

Share this article

Add comment

Smart Search

me@grafxflow Author Profile picture

me@grafxflow

Founder, Grafxflow

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. I build lighting-fast dynamic content engines with Laravel, Winter CMS and Tailwind CSS. Thanks for stopping by!