Post by Qphoria » Thu Feb 02, 2012 10:32 pm

Q: How can I update jQuery or use Google API for jQuery?

A:
If you want to get the latest jQuery or use google apis version, you can change it here:

1. Go here to find the latest version of Google API for jQuery:
http://code.google.com/apis/libraries/d ... tml#jquery

2. Copy the "path" line WITHOUT the "https:" part, example:
jquery_google_api_example.png

jquery_google_api_example.png (22.7 KiB) Viewed 8404 times

3. EDIT: catalog/view/theme/YOURTHEME/template/common/header.tpl

4. FIND:

Code: Select all

<script type="text/javascript" src="catalog/view/javascript/jquery/jquery-1.6.1.min.js"></script>
5. PASTE THE NEW PATH in the "src=". The end result should look like this:

Code: Select all

<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
The reason why you don't copy the "https:" part is to allow the code to automatically determine if it should use the http or https version of the file automatically based on whether or not the site is currently using http or https.

Image


User avatar
Administrator

Posts

Joined
Tue Jul 22, 2008 3:02 am
Who is online

Users browsing this forum: No registered users and 1 guest