root / drupal7 / sites / all / modules / nice_menus / js / nice_menus.js @ 384fc62a
1 | 85ad3d82 | Assos Assos | /**
|
---|---|---|---|
2 | * @file
|
||
3 | * Behaviours for the Nice Menus module. This uses Superfish 1.4.8.
|
||
4 | *
|
||
5 | * @link http://users.tpg.com.au/j_birch/plugins/superfish
|
||
6 | */
|
||
7 | |||
8 | (function ($) { |
||
9 | |||
10 | /**
|
||
11 | * Add Superfish to all Nice Menus with some basic options.
|
||
12 | */
|
||
13 | Drupal.behaviors.niceMenus = { |
||
14 | attach: function (context, settings) { |
||
15 | $('ul.nice-menu:not(.nice-menus-processed)').addClass('nice-menus-processed').each(function () { |
||
16 | $(this).superfish({ |
||
17 | // Apply a generic hover class.
|
||
18 | hoverClass: 'over', |
||
19 | // Disable generation of arrow mark-up.
|
||
20 | autoArrows: false, |
||
21 | // Disable drop shadows.
|
||
22 | dropShadows: false, |
||
23 | // Mouse delay.
|
||
24 | delay: Drupal.settings.nice_menus_options.delay,
|
||
25 | // Animation speed.
|
||
26 | speed: Drupal.settings.nice_menus_options.speed
|
||
27 | }); |
||
28 | |||
29 | // Add in Brandon Aaron’s bgIframe plugin for IE select issues.
|
||
30 | // http://plugins.jquery.com/node/46/release
|
||
31 | $(this).find('ul').bgIframe({opacity:false}); |
||
32 | |||
33 | $('ul.nice-menu ul').css('display', 'none'); |
||
34 | }); |
||
35 | } |
||
36 | }; |
||
37 | |||
38 | })(jQuery); |