You are here

function theme_jquery_countdown in jQuery Countdown 5

Same name and namespace in other branches
  1. 6 jquery_countdown.theme.inc \theme_jquery_countdown()
  2. 7.2 jquery_countdown.module \theme_jquery_countdown()
  3. 7 jquery_countdown.module \theme_jquery_countdown()

Constructs a jQuery Countdown element and adds the required JavaScript.

Parameters

$content: (optional) The initial content to put in the countdown. This is what is shown when JavaScript is not available.

$options: (optional) The options to apply to the element.

$id: (optional) The name of the element.

1 theme call to theme_jquery_countdown()
jquery_countdown_help in ./jquery_countdown.module
Implementation of hook_help().

File

./jquery_countdown.module, line 113

Code

function theme_jquery_countdown($options = array(), $content = '', $id = 'jquery-countdown') {

  // Construct the ID name and add the JavaScript.
  $id = form_clean_id($id);
  jquery_countdown_add('#' . $id, $options);

  // Construct the HTML.
  return "<div id='{$id}' class='jquery-countdown'>{$content}</div>";
}