You are here

jcarousel.module in jCarousel 5

This module provides a central function for adding the jCarousel jQuery plugin and makes sure it's added only once per page.

File

jcarousel.module
View 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

Namesort descending Description
jcarousel_add Add the JS and basic CSS to the current page, if they aren't added already.