Newer
Older
<?php
/**
* @file
* This module provides a central function for adding the jCarousel jQuery
* plugin and makes sure it's added only once per page.
*/
/**
Wim Leers
committed
* Add the JS and basic CSS to the current page, if they aren't added already.
*/
Wim Leers
committed
function jcarousel_add() {
static $added;
if (!isset($added)) {
drupal_add_js(drupal_get_path('module', 'jcarousel') .'/jcarousel.js');
drupal_add_css(drupal_get_path('module', 'jcarousel') .'/jcarousel.css');
$added = TRUE;
}
}