Dropdown Menu Widget - Version 1.6.4

Version Description

  • Fixed effect selector error.
  • Added width option for vertical menus.
Download this release

Release Info

Developer mattsay
Plugin Icon wp plugin Dropdown Menu Widget
Version 1.6.4
Comparing to
See all releases

Code changes from version 1.6.3 to 1.6.4

admin.css ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /** Dropdown Menu Widget Admin Styles */
2
+ .shailan_dm_input{padding:10px;}
3
+ .shailan_dm_input small{font-style:italic; font-size:smaller; color:#666;}
4
+ .shailan_dm_input label{ font-size:12px;
5
+ width:200px;
6
+ display:block;
7
+ float:left; }
8
+
9
+ .shailan_dm_input input[type=text]{
10
+ width:280px;}
11
+
12
+ .shailan_dm_input textarea{
13
+ width:400px; height:150px; }
14
+
15
+ #widgets-right .widgets-sortables{ min-height:0px; }
16
+
17
+ .widget-holder{position:relative; zoom:1;}
18
+
19
+ #picker{ position:absolute; top:10px; right:10px; }
20
+
21
+
22
+
23
+ .sidebar-name{overflow:auto; display:block;}
24
+ .sidebar-name h3{float:left;}
25
+ .sidebar-name span{float:right;}
26
+
27
+ input.selected{border:1px solid #f93}
28
+ input.color-error{border:1px solid #f00;}
blank.gif ADDED
Binary file
css/shailan-dropdown.css CHANGED
@@ -1,17 +1,12 @@
1
  /* Reset */
2
  div.shailan-dropdown-menu table, div.shailan-dropdown-menu tbody, div.shailan-dropdown-menu tr, div.shailan-dropdown-menu td, div.shailan-dropdown-menu ul, div.shailan-dropdown-menu li, div.dropdown-horizontal-container, ul.dropdown * { margin:0; padding:0; border:0; }
3
-
4
  .dropdown-horizontal-container{ width:100%; }
5
-
6
  /* Remove list styling */
7
  ul.dropdown, ul.dropdown li, ul.dropdown ul { list-style: none; margin: 0; padding: 0; }
8
 
9
  /* Z-index */
10
- ul.dropdown, ul.dropdown li, ul.dropdown ul li, ul.dropdown li.hover, ul.dropdown li:hover { position: relative; }
11
- ul.dropdown li { /*z-index: 598;*/ }
12
- ul.dropdown ul { position:absolute; z-index: 597; }
13
- ul.dropdown ul li { z-index: 598; }
14
-
15
  ul.dropdown li.hover, ul.dropdown li:hover{ cursor: default; }
16
 
17
  /* Top level */
@@ -37,6 +32,6 @@ ul.dropdown ul, ul.dropdown li.hover ul ul, ul.dropdown li.hover ul ul ul, ul.dr
37
  ul.dropdown ul ul ul ul ul ul { display: none !important; }
38
 
39
  /* Vertical menu support */
40
- ul.dropdown-vertical { /*width: 240px;*/ }
41
- ul.dropdown-vertical ul { top: 1px; left: 99%; }
42
  ul.dropdown-vertical li { float: none; display:block; }
1
  /* Reset */
2
  div.shailan-dropdown-menu table, div.shailan-dropdown-menu tbody, div.shailan-dropdown-menu tr, div.shailan-dropdown-menu td, div.shailan-dropdown-menu ul, div.shailan-dropdown-menu li, div.dropdown-horizontal-container, ul.dropdown * { margin:0; padding:0; border:0; }
 
3
  .dropdown-horizontal-container{ width:100%; }
 
4
  /* Remove list styling */
5
  ul.dropdown, ul.dropdown li, ul.dropdown ul { list-style: none; margin: 0; padding: 0; }
6
 
7
  /* Z-index */
8
+ ul.dropdown li{ position: relative; }
9
+ ul.dropdown li ul { position:absolute; z-index: 497; }
 
 
 
10
  ul.dropdown li.hover, ul.dropdown li:hover{ cursor: default; }
11
 
12
  /* Top level */
32
  ul.dropdown ul ul ul ul ul ul { display: none !important; }
33
 
34
  /* Vertical menu support */
35
+ ul.dropdown-vertical.dropdown-align-left ul { top: 1px; left: 99%; }
36
+ ul.dropdown-vertical.dropdown-align-right ul { top: 1px; right: 99%; }
37
  ul.dropdown-vertical li { float: none; display:block; }
js/admin.js CHANGED
@@ -33,7 +33,7 @@ jQuery(document).ready(function() {
33
  shailan_dm_active_theme_change();
34
 
35
  function shailan_dm_effects_change(){
36
- if(jQuery('#shailan_dm_effects').attr('checked') == true){
37
  jQuery('#shailan_dm_effect').enable();
38
  jQuery('#shailan_dm_effect_speed').enable();
39
  } else {
33
  shailan_dm_active_theme_change();
34
 
35
  function shailan_dm_effects_change(){
36
+ if( jQuery('#shailan_dm_effects').attr('checked') == true || jQuery('#shailan_dm_effects').attr('checked') == 'checked' ){
37
  jQuery('#shailan_dm_effect').enable();
38
  jQuery('#shailan_dm_effect_speed').enable();
39
  } else {
js/hoverIntent.js CHANGED
@@ -1,11 +1,39 @@
1
- (function($){
2
- /* hoverIntent by Brian Cherne */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  $.fn.hoverIntent = function(f,g) {
4
  // default configuration options
5
  var cfg = {
6
  sensitivity: 7,
7
  interval: 100,
8
- timeout: 0
9
  };
10
  // override configuration options with user supplied object
11
  cfg = $.extend(cfg, g ? { over: f, out: g } : f );
@@ -47,11 +75,6 @@
47
 
48
  // A private function for handling mouse 'hovering'
49
  var handleHover = function(e) {
50
- // next three lines copied from jQuery.hover, ignore children onMouseOver/onMouseOut
51
- var p = (e.type == "mouseover" ? e.fromElement : e.toElement) || e.relatedTarget;
52
- while ( p && p != this ) { try { p = p.parentNode; } catch(e) { p = this; } }
53
- if ( p == this ) { return false; }
54
-
55
  // copy objects to be passed into t (required for event object to be passed in IE)
56
  var ev = jQuery.extend({},e);
57
  var ob = this;
@@ -59,8 +82,8 @@
59
  // cancel hoverIntent timer if it exists
60
  if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
61
 
62
- // else e.type == "onmouseover"
63
- if (e.type == "mouseover") {
64
  // set "previous" X and Y position based on initial entry point
65
  pX = ev.pageX; pY = ev.pageY;
66
  // update "current" X and Y position based on mousemove
@@ -68,7 +91,7 @@
68
  // start polling interval (self-calling timeout) to compare mouse coordinates over time
69
  if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
70
 
71
- // else e.type == "onmouseout"
72
  } else {
73
  // unbind expensive mousemove event
74
  $(ob).unbind("mousemove",track);
@@ -78,7 +101,6 @@
78
  };
79
 
80
  // bind the function to the two event listeners
81
- return this.mouseover(handleHover).mouseout(handleHover);
82
  };
83
-
84
  })(jQuery);
1
+ /**
2
+ * hoverIntent is similar to jQuery's built-in "hover" function except that
3
+ * instead of firing the onMouseOver event immediately, hoverIntent checks
4
+ * to see if the user's mouse has slowed down (beneath the sensitivity
5
+ * threshold) before firing the onMouseOver event.
6
+ *
7
+ * hoverIntent r6 // 2011.02.26 // jQuery 1.5.1+
8
+ * <http://cherne.net/brian/resources/jquery.hoverIntent.html>
9
+ *
10
+ * hoverIntent is currently available for use in all personal or commercial
11
+ * projects under both MIT and GPL licenses. This means that you can choose
12
+ * the license that best suits your project, and use it accordingly.
13
+ *
14
+ * // basic usage (just like .hover) receives onMouseOver and onMouseOut functions
15
+ * $("ul li").hoverIntent( showNav , hideNav );
16
+ *
17
+ * // advanced usage receives configuration object only
18
+ * $("ul li").hoverIntent({
19
+ * sensitivity: 7, // number = sensitivity threshold (must be 1 or higher)
20
+ * interval: 100, // number = milliseconds of polling interval
21
+ * over: showNav, // function = onMouseOver callback (required)
22
+ * timeout: 0, // number = milliseconds delay before onMouseOut function call
23
+ * out: hideNav // function = onMouseOut callback (required)
24
+ * });
25
+ *
26
+ * @param f onMouseOver function || An object with configuration options
27
+ * @param g onMouseOut function || Nothing (use configuration options object)
28
+ * @author Brian Cherne brian(at)cherne(dot)net
29
+ */
30
+ (function($) {
31
  $.fn.hoverIntent = function(f,g) {
32
  // default configuration options
33
  var cfg = {
34
  sensitivity: 7,
35
  interval: 100,
36
+ timeout: 200
37
  };
38
  // override configuration options with user supplied object
39
  cfg = $.extend(cfg, g ? { over: f, out: g } : f );
75
 
76
  // A private function for handling mouse 'hovering'
77
  var handleHover = function(e) {
 
 
 
 
 
78
  // copy objects to be passed into t (required for event object to be passed in IE)
79
  var ev = jQuery.extend({},e);
80
  var ob = this;
82
  // cancel hoverIntent timer if it exists
83
  if (ob.hoverIntent_t) { ob.hoverIntent_t = clearTimeout(ob.hoverIntent_t); }
84
 
85
+ // if e.type == "mouseenter"
86
+ if (e.type == "mouseenter") {
87
  // set "previous" X and Y position based on initial entry point
88
  pX = ev.pageX; pY = ev.pageY;
89
  // update "current" X and Y position based on mousemove
91
  // start polling interval (self-calling timeout) to compare mouse coordinates over time
92
  if (ob.hoverIntent_s != 1) { ob.hoverIntent_t = setTimeout( function(){compare(ev,ob);} , cfg.interval );}
93
 
94
+ // else e.type == "mouseleave"
95
  } else {
96
  // unbind expensive mousemove event
97
  $(ob).unbind("mousemove",track);
101
  };
102
 
103
  // bind the function to the two event listeners
104
+ return this.bind('mouseenter',handleHover).bind('mouseleave',handleHover);
105
  };
 
106
  })(jQuery);
js/include-test.js DELETED
@@ -1,9 +0,0 @@
1
- // Dom Ready
2
- jQuery(document).ready(function($) {
3
- // Dropdown menu support for IE
4
- $('.dropdown li').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); });
5
- // Add child classes to lists
6
- $('ul li:first-child').addClass('first-child'); $('ul li:last-child').addClass('last-child');
7
-
8
- // $('ul.children').parent().find('a:first').removeAttr('href');
9
- });
 
 
 
 
 
 
 
 
 
js/include.js CHANGED
@@ -1,7 +1,7 @@
1
  // Dom Ready
2
  jQuery(document).ready(function($) {
3
  // Dropdown menu support for IE
4
- $('.dropdown li').hover(function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); });
5
  $(".dropdown li:has(ul)").addClass("parent");
6
  // Add child classes to lists
7
  $('ul li:first-child').addClass('first-child'); $('ul li:last-child').addClass('last-child');
1
  // Dom Ready
2
  jQuery(document).ready(function($) {
3
  // Dropdown menu support for IE
4
+ $('.dropdown li').hover( function(){ $(this).addClass('hover'); }, function(){ $(this).removeClass('hover'); });
5
  $(".dropdown li:has(ul)").addClass("parent");
6
  // Add child classes to lists
7
  $('ul li:first-child').addClass('first-child'); $('ul li:last-child').addClass('last-child');
readme.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: http://shailan.com/donate
4
  Tags: css, dropdown, menu, widget, pages, categories, multi, jquery, navigation, category list, themes, custom-styles, options-page, animations, effects
5
  Requires at least: 2.8
6
  Tested up to: 3.1
7
- Stable tag: 1.6.3
8
 
9
  This widget adds a beatiful vertical/horizontal CSS only dropdown menu of Pages, Categories or Custom navigation menus of your blog.
10
 
@@ -47,6 +47,10 @@ You can submit errors and bugs using the [online form](http://shailan.com/contac
47
 
48
  == Changelog ==
49
 
 
 
 
 
50
  = 1.6.3 =
51
  * Fixed: Supplied arguments for the menu overwritten in the menu function.
52
  * Added: Now you can easily add menus using menu names & ids and even locations.
4
  Tags: css, dropdown, menu, widget, pages, categories, multi, jquery, navigation, category list, themes, custom-styles, options-page, animations, effects
5
  Requires at least: 2.8
6
  Tested up to: 3.1
7
+ Stable tag: 1.6.4
8
 
9
  This widget adds a beatiful vertical/horizontal CSS only dropdown menu of Pages, Categories or Custom navigation menus of your blog.
10
 
47
 
48
  == Changelog ==
49
 
50
+ = 1.6.4 =
51
+ * Fixed effect selector error.
52
+ * Added width option for vertical menus.
53
+
54
  = 1.6.3 =
55
  * Fixed: Supplied arguments for the menu overwritten in the menu function.
56
  * Added: Now you can easily add menus using menu names & ids and even locations.
shailan.DropDownMenu.php CHANGED
@@ -4,13 +4,13 @@ Plugin Name: Dropdown Menu Widget
4
  Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
5
  Description: A multi widget to generate drop-down menus from your pages, categories & navigation menus. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
6
  Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme
7
- Version: 1.6.3
8
  Author: Matt Say
9
  Author URI: http://shailan.com
10
  Text Domain: shailan-dropdown-menu
11
  */
12
 
13
- define('SHAILAN_DM_VERSION', '1.6.3');
14
  define('SHAILAN_DM_TITLE', 'Dropdown Menu');
15
  define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
16
 
@@ -38,6 +38,7 @@ class shailan_DropdownWidget extends WP_Widget {
38
  if(!is_admin()){
39
  wp_enqueue_script( 'jquery' );
40
  wp_enqueue_script( 'dropdown-ie-support', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/js/include.js', array('jquery') );
 
41
  }
42
 
43
  // Define themes
@@ -81,6 +82,7 @@ class shailan_DropdownWidget extends WP_Widget {
81
  $types = array('pages'=>'Pages', 'categories'=>'Categories');
82
  $effects = array('fade'=>'Fade In/Out', 'slide'=>'Slide Up/Down'/*, 'fade2'=>'Fade In/Out Moving Up'*/);
83
  $speed = array('400'=>'Normal', 'fast'=>'Fast', 'slow'=>'Slow');
 
84
 
85
  if( function_exists('wp_nav_menu') ){
86
  // Get available menus
@@ -146,6 +148,12 @@ class shailan_DropdownWidget extends WP_Widget {
146
  "type" => "select",
147
  "options" => $speed ),
148
 
 
 
 
 
 
 
149
  array("type" => "splitter"),
150
 
151
  array( "name" => "Wrap long menu items",
@@ -310,7 +318,8 @@ class shailan_DropdownWidget extends WP_Widget {
310
  'vertical' => false,
311
  'align' => 'left',
312
  'theme' => 'none',
313
- 'show_title' => false
 
314
  );
315
 
316
  $pluginname = $this->pluginname;
@@ -386,6 +395,12 @@ class shailan_DropdownWidget extends WP_Widget {
386
  $custom_walkers = false; // (bool) get_option('shailan_dm_customwalkers'); disabled
387
  $show_empty = (bool) get_option('shailan_dm_show_empty');
388
 
 
 
 
 
 
 
389
  echo $args['before_widget'];
390
 
391
  // Show title if option checked
@@ -400,7 +415,7 @@ class shailan_DropdownWidget extends WP_Widget {
400
  $dropdown_wrapper_open = $nl . '<div id="shailan-dropdown-wrapper-' . $this->number . '" >';
401
 
402
  $dropdown_open = $indent . '<div align="' . $align . '" class="'.$orientation.'-container dm-align-'.$align.'"><table cellpadding="0" cellspacing="0"><tr><td>';
403
- $list_open = $indent2 . '<ul id="dropdown-'. $this->number .'" class="dropdown dropdown-'. $this->number .' '. $orientation . ' dropdown-align-'.$align.'">' . $nl . "<!-- Menu elements start -->\n";
404
 
405
  if($home && ($type == 'pages' || $type == 'categories')){
406
 
@@ -553,6 +568,7 @@ class shailan_DropdownWidget extends WP_Widget {
553
  $widget_options = wp_parse_args( $instance, $this->defaults );
554
  extract( $widget_options, EXTR_SKIP );
555
 
 
556
  $show_title = (bool) $show_title;
557
  $home = (bool) $home;
558
  $login = (bool) $login;
@@ -575,6 +591,9 @@ class shailan_DropdownWidget extends WP_Widget {
575
 
576
  <p><label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e('Exclude:', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $this->get_field_id('exclude'); ?>" name="<?php echo $this->get_field_name('exclude'); ?>" type="text" value="<?php echo $exclude; ?>" /></label><br />
577
  <small>Page IDs, separated by commas.</small></p>
 
 
 
578
 
579
  <p>
580
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('home'); ?>" name="<?php echo $this->get_field_name('home'); ?>"<?php checked( $home ); ?> />
@@ -740,6 +759,7 @@ class shailan_DropdownWidget extends WP_Widget {
740
  $is_fx_active = (bool) get_option('shailan_dm_effects');
741
  $speed = get_option('shailan_dm_effect_speed', '400');
742
  $effect = get_option('shailan_dm_effect', 'fade');
 
743
 
744
  if( $is_fx_active || $remove_title_attributes || $remove_top_level_links ){
745
 
@@ -782,31 +802,31 @@ class shailan_DropdownWidget extends WP_Widget {
782
  // Dropdown FX
783
  if( 'fade' == $effect ){
784
  ?>
785
- $(".dropdown li").hover(function(){
786
- $(this).find("ul:first").fadeIn('<?php echo $speed; ?>');
787
- },
788
- function(){
789
- $(this).find("ul:first").fadeOut('<?php echo $speed; ?>');
790
- });
 
 
791
  <?php
792
  } elseif( 'slide' == $effect ) { ?>
793
- $(".dropdown li").hover(function(){
794
- $(this).find("ul:first").slideDown('<?php echo $speed; ?>');
795
- },
796
- function(){
797
- $(this).find("ul:first").slideUp('<?php echo $speed; ?>');
798
- });
 
 
799
  <?php
800
  } elseif( 'fade2' == $effect ) { ?>
801
-
802
- $(".dropdown li").hover(function(){
803
- h = $(this).height() + 'px';
804
- $(this).find("ul:first").animate( {opacity:'show', top:h}, '<?php echo $speed; ?>');
805
- },
806
- function(){
807
- h = $(this).height() + 5 + 'px';
808
- $(this).find("ul:first").animate( {opacity:'hide', top:h}, '<?php echo $speed; ?>');
809
- });
810
 
811
  <?php }
812
 
4
  Plugin URI: http://shailan.com/wordpress/plugins/dropdown-menu
5
  Description: A multi widget to generate drop-down menus from your pages, categories & navigation menus. You can find more widgets, plugins and themes at <a href="http://shailan.com">shailan.com</a>.
6
  Tags: dropdown, menu, css, css-dropdown, navigation, widget, dropdown-menu, customization, theme
7
+ Version: 1.6.4
8
  Author: Matt Say
9
  Author URI: http://shailan.com
10
  Text Domain: shailan-dropdown-menu
11
  */
12
 
13
+ define('SHAILAN_DM_VERSION', '1.6.4');
14
  define('SHAILAN_DM_TITLE', 'Dropdown Menu');
15
  define('SHAILAN_DM_FOLDER', 'dropdown-menu-widget');
16
 
38
  if(!is_admin()){
39
  wp_enqueue_script( 'jquery' );
40
  wp_enqueue_script( 'dropdown-ie-support', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/js/include.js', array('jquery') );
41
+ wp_enqueue_script( 'hover-intent', WP_PLUGIN_URL . '/' . SHAILAN_DM_FOLDER . '/js/hoverIntent.js', array('jquery') );
42
  }
43
 
44
  // Define themes
82
  $types = array('pages'=>'Pages', 'categories'=>'Categories');
83
  $effects = array('fade'=>'Fade In/Out', 'slide'=>'Slide Up/Down'/*, 'fade2'=>'Fade In/Out Moving Up'*/);
84
  $speed = array('400'=>'Normal', 'fast'=>'Fast', 'slow'=>'Slow');
85
+ $delay = array('100'=>'1s', '200'=>'2s', '300'=>'3s', '400'=>'4s', '500'=>'5s');
86
 
87
  if( function_exists('wp_nav_menu') ){
88
  // Get available menus
148
  "type" => "select",
149
  "options" => $speed ),
150
 
151
+ array( "name" => "Effect delay",
152
+ "desc" => "Select effect delay",
153
+ "id" => "shailan_dm_effect_delay",
154
+ "type" => "select",
155
+ "options" => $delay ),
156
+
157
  array("type" => "splitter"),
158
 
159
  array( "name" => "Wrap long menu items",
318
  'vertical' => false,
319
  'align' => 'left',
320
  'theme' => 'none',
321
+ 'show_title' => false,
322
+ 'width' => 'empty'
323
  );
324
 
325
  $pluginname = $this->pluginname;
395
  $custom_walkers = false; // (bool) get_option('shailan_dm_customwalkers'); disabled
396
  $show_empty = (bool) get_option('shailan_dm_show_empty');
397
 
398
+ $width = (int) $width;
399
+
400
+ $width_attr = '';
401
+ if( $width > 0 )
402
+ $width_attr = 'style="width:' . $width . 'px;"';
403
+
404
  echo $args['before_widget'];
405
 
406
  // Show title if option checked
415
  $dropdown_wrapper_open = $nl . '<div id="shailan-dropdown-wrapper-' . $this->number . '" >';
416
 
417
  $dropdown_open = $indent . '<div align="' . $align . '" class="'.$orientation.'-container dm-align-'.$align.'"><table cellpadding="0" cellspacing="0"><tr><td>';
418
+ $list_open = $indent2 . '<ul id="dropdown-'. $this->number .'" class="dropdown dropdown-'. $this->number .' '. $orientation . ' dropdown-align-'.$align.'" '. $width_attr .' >' . $nl . "<!-- Menu elements start -->\n";
419
 
420
  if($home && ($type == 'pages' || $type == 'categories')){
421
 
568
  $widget_options = wp_parse_args( $instance, $this->defaults );
569
  extract( $widget_options, EXTR_SKIP );
570
 
571
+ $width = (int) $width;
572
  $show_title = (bool) $show_title;
573
  $home = (bool) $home;
574
  $login = (bool) $login;
591
 
592
  <p><label for="<?php echo $this->get_field_id('exclude'); ?>"><?php _e('Exclude:', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $this->get_field_id('exclude'); ?>" name="<?php echo $this->get_field_name('exclude'); ?>" type="text" value="<?php echo $exclude; ?>" /></label><br />
593
  <small>Page IDs, separated by commas.</small></p>
594
+
595
+ <p><label for="<?php echo $this->get_field_id('width'); ?>"><?php _e('Menu Width:', 'shailan-dropdown-menu'); ?> <input class="widefat" id="<?php echo $this->get_field_id('width'); ?>" name="<?php echo $this->get_field_name('width'); ?>" type="text" value="<?php echo $width; ?>" /></label><br />
596
+ <small>Menu width, leave blank for default.</small></p>
597
 
598
  <p>
599
  <input type="checkbox" class="checkbox" id="<?php echo $this->get_field_id('home'); ?>" name="<?php echo $this->get_field_name('home'); ?>"<?php checked( $home ); ?> />
759
  $is_fx_active = (bool) get_option('shailan_dm_effects');
760
  $speed = get_option('shailan_dm_effect_speed', '400');
761
  $effect = get_option('shailan_dm_effect', 'fade');
762
+ $delay = get_option('shailan_dm_effect_delay', '100');
763
 
764
  if( $is_fx_active || $remove_title_attributes || $remove_top_level_links ){
765
 
802
  // Dropdown FX
803
  if( 'fade' == $effect ){
804
  ?>
805
+
806
+ var config = {
807
+ over : function(){ $(this).find("ul:first").fadeIn('<?php echo $speed; ?>'); },
808
+ out : function(){ $(this).find("ul:first").fadeOut('<?php echo $speed; ?>'); },
809
+ timeout : <?php echo $delay; ?>
810
+ }
811
+
812
+ $(".dropdown li").hoverIntent( config );
813
  <?php
814
  } elseif( 'slide' == $effect ) { ?>
815
+
816
+ var config = {
817
+ over : function(){ $(this).find("ul:first").slideDown('<?php echo $speed; ?>'); },
818
+ out : function(){ $(this).find("ul:first").slideUp('<?php echo $speed; ?>'); },
819
+ timeout : <?php echo $delay; ?>
820
+ }
821
+
822
+ $(".dropdown li").hoverIntent( config );
823
  <?php
824
  } elseif( 'fade2' == $effect ) { ?>
825
+
826
+ $(".dropdown li").hoverIntent(
827
+ function(){ h = $(this).height() + 'px'; $(this).find("ul:first").animate( {opacity:'show', top:h}, '<?php echo $speed; ?>'); },
828
+ function(){ h = $(this).height() + 5 + 'px'; $(this).find("ul:first").animate( {opacity:'hide', top:h}, '<?php echo $speed; ?>'); }
829
+ );
 
 
 
 
830
 
831
  <?php }
832
 
themes/mtv.com/default.css CHANGED
@@ -112,7 +112,6 @@
112
  ul.dropdown ul {
113
  /*left: auto;*/
114
  right: 0;
115
- width: 150px;
116
  margin-top: -1px;
117
  border-top: 1px solid #1a1a1a;
118
  border-left: solid 1px #4c4c4c;
112
  ul.dropdown ul {
113
  /*left: auto;*/
114
  right: 0;
 
115
  margin-top: -1px;
116
  border-top: 1px solid #1a1a1a;
117
  border-left: solid 1px #4c4c4c;
themes/mtv.com/default.ultimate.css CHANGED
@@ -59,23 +59,6 @@ ul.dropdown ul *.dir {
59
  padding: 8px 30px 8px 8px;
60
  }
61
 
62
-
63
-
64
- /*------------------------------------------------------------------------------------------------------/
65
- * @section Custom Styles
66
- */
67
-
68
-
69
- ul.dropdown ul a {
70
- width: 133px;
71
- }
72
-
73
- ul.dropdown ul a.dir {
74
- width: 111px;
75
- }
76
-
77
-
78
-
79
  /*------------------------------------------------------------------------------------------------------/
80
  * @section Support Class `open` Usage
81
  * @source js, artificial
59
  padding: 8px 30px 8px 8px;
60
  }
61
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62
  /*------------------------------------------------------------------------------------------------------/
63
  * @section Support Class `open` Usage
64
  * @source js, artificial