| 1 |
<?php
|
| 2 |
// $Id: hoverintent.module,v 1.1 2008/01/24 18:54:40 aaron Exp $
|
| 3 |
|
| 4 |
/**
|
| 5 |
* This will register the plugin with the jQ module.
|
| 6 |
* To invoke, use jq_add('hoverIntent');
|
| 7 |
*/
|
| 8 |
function hoverintent_jq($op, $plugin = NULL) {
|
| 9 |
switch ($op) {
|
| 10 |
case 'info':
|
| 11 |
$version = "hoverIntent r5 // 2007.03.27 // jQuery 1.1.2";
|
| 12 |
$url = 'http://plugins.jquery.com/project/hoverIntent';
|
| 13 |
return array(
|
| 14 |
'hoverIntent' => array(
|
| 15 |
'name' => t('hoverIntent'),
|
| 16 |
'description' => t("HoverIntent is similar to jQuery's hover. However, instead of calling onMouseOver and onMouseOut functions immediately, this plugin tracks the user's mouse onMouseOver and waits until it slows down before calling the onMouseOver function... and it will only call the onMouseOut function after an onMouseOver is called."),
|
| 17 |
'version' => $version,
|
| 18 |
'url' => $url,
|
| 19 |
'files' => array(
|
| 20 |
'js' => array(
|
| 21 |
drupal_get_path('module', 'hoverintent') . '/js/jquery.hoverIntent.minified.js',
|
| 22 |
),
|
| 23 |
),
|
| 24 |
),
|
| 25 |
);
|
| 26 |
break;
|
| 27 |
}
|
| 28 |
}
|
| 29 |
|
| 30 |
/**
|
| 31 |
* This adds the plugin manually, without going through jQ.
|
| 32 |
*/
|
| 33 |
function hoverintent_add() {
|
| 34 |
drupal_add_js(drupal_get_path('module', 'hoverintent') . '/js/jquery.hoverIntent.minified.js');
|
| 35 |
}
|