Written by me@grafxflow
06 Mar, 2013
0
4,590
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?
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>
24 Nov, 2013
07 Nov, 2012
30 Apr, 2017
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!
Follow11 Jul, 2023
21 Jun, 2023
Views: 166,433
Views: 40,388
Views: 37,136
Views: 33,664