This is how I did it.
Your mileage may vary.
1) You'll need to open up the index.php Joomla file
in a text editor. The file can be found in whatever theme folder
is currently your default.
2) Add these lines of code :
Code:
<script type="text/javascript" src="http://www.google.com/jsapi"></script>
<script type="text/javascript">google.load("jquery", "1.6.1");</script><!--Added Google Library javascript-->
immediately before the
Code:
<jdoc:include type="head" />
You should now have jQuery running on your page.
If you have Firefox with the FireBug extension, you can test
it by cache refreshing your Joomla Homepage (Ctrl + F5),
opening Firebug (F12), and testing the jQuery version
as described in another post here: http://tycoontalk.freelancer.com/jav...y-version.html
This approach uses the Google API JavaScript library rather
than downloading and installing your own version of jQuery.
Why it's best practice.
a) You are getting a compressed version of jQuery (17KB instead of about 80KB)
b) Parallel downloading the library speeds your page load time
c) Fair chance the user already has the Google jQuery file cached in their
browser. More and more developers are taking the same approach.
__________________
RATE-MY-WEBSITE.com "Free website reviews by real web professionals" Please login or register to view this content. Registration is FREE
Last edited by TWD; 07-29-2011 at 01:57 AM..
|