O'Reilly logo

Joomla! 1.5 JavaScript jQuery by Jose Argudo Blanco

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding jQuery to our module—refreshing data using JavaScript

Making our module look better is quite easy, as we are only using plain HTML for now. A bit of jQuery won't do any harm; in fact, it will look much better.

For this example, I've one jQuery plugin in mind: the Vertical news ticker plugin. We can find it on the jQuery site by searching for "Vertical news ticker", or we can download it at the following link:

http://plugins.jquery.com/project/vTicker.

Download the plugin, place the jquery.vticker.js file in modules/mod_tinynews/js/, and we are done. We have the necessary tool for our example. Our next step will be to change the modules/mod_tinynews/tmpl/default_tmpl.php file, just some cosmetic changes, as follows:

<?php defined('_JEXEC') ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required