function theme_jquery_countdown in jQuery Countdown 7.2
Same name and namespace in other branches
- 5 jquery_countdown.module \theme_jquery_countdown()
- 6 jquery_countdown.theme.inc \theme_jquery_countdown()
- 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.
2 theme calls to theme_jquery_countdown()
File
- ./
jquery_countdown.module, line 260
Code
function theme_jquery_countdown($variables) {
//@TODO: add javascript fallback for target time as possible $content ?!
$id = $variables['id'];
$options = $variables['options'];
$content = $variables['content'];
// Construct the ID name and add the JavaScript.
$id = drupal_html_id($id);
// add the Javascript
jquery_countdown_add('#' . $id, $options);
// Construct the HTML.
return '<div id="' . $id . '" class="jquery-countdown">' . $content . '</div>';
}