-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Joomla! 1.5 Templates Cookbook
There are a number of JavaScript libraries available that allow quicker development of JavaScript behavior for your website. We'll use the jQuery library, as this is one of the more popular JavaScript libraries.
Firstly, download jQuery from the jQuery website at http://docs.jquery.com/Downloading_jQuery.
1. Save the jQuery JavaScript file as jquery.js in the templates\rhuk_milkyway\js\ directory. You may need to create the js directory yourself. Now open your template's index.php file and locate the<head> element within the template:
<head> <!-- omitted content --> <script type="text/javascript" src="<?php echo $this->baseurl ?>/templates/rhuk_milkyway/js/jquery.js"></script> </head>
That's it! Your Joomla! template now includes the jQuery library, meaning you can make use of it!
There are many extensions to jQuery for specific features, from slideshows...
Change the font size
Change margin width
Change background colour