/[drupal]/contributions/modules/hoverintent/hoverintent.module
ViewVC logotype

Contents of /contributions/modules/hoverintent/hoverintent.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download) (as text)
Wed Aug 27 14:41:03 2008 UTC (14 months, 4 weeks ago) by aaron
Branch: MAIN
CVS Tags: DRUPAL-5--1-0, HEAD
Branch point for: DRUPAL-5, DRUPAL-6--1
Changes since 1.1: +12 -1 lines
File MIME type: text/x-php
 * Remove dependency on jQ (aaron).
 * Allow hoverIntent to be added w/o jQ requirement (aaron).
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 }

  ViewVC Help
Powered by ViewVC 1.1.2