jcarousel.module in jCarousel 5
Same filename and directory in other branches
This module provides a central function for adding the jCarousel jQuery plugin and makes sure it's added only once per page.
File
jcarousel.moduleView source
<?php
/**
* @file
* This module provides a central function for adding the jCarousel jQuery
* plugin and makes sure it's added only once per page.
*/
/**
* Add the JS and basic CSS to the current page, if they aren't added already.
*/
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;
}
}
Functions
Name | Description |
---|---|
jcarousel_add | Add the JS and basic CSS to the current page, if they aren't added already. |