Browse Source

Do not add the id="simplemenu" in JavaScript. Do it in PHP instead.
Added a new superfish parameter added in 1.4.8 (not present in 1.4.1 so it
has not side effect to the old version.)

Alexis Wilke 15 năm trước cách đây
mục cha
commit
202280fa6b
1 tập tin đã thay đổi với 4 bổ sung2 xóa
  1. 4 2
      simplemenu.js

+ 4 - 2
simplemenu.js

@@ -12,7 +12,7 @@ Drupal.behaviors.simplemenuAttach = function(context) {
 
   // get the element to add the menu to
   var element = Drupal.settings.simplemenu.element;
-  var menu = $(simplemenu).attr("id", "simplemenu").addClass('clear-block');
+  var menu = $(simplemenu);
 
   switch (Drupal.settings.simplemenu.placement) {
     case 'prepend':
@@ -33,11 +33,13 @@ Drupal.behaviors.simplemenuAttach = function(context) {
   
   // Build menu
   $(menu)
+    .find('#simplemenu')
     .superfish({
       pathClass: 'current',
       animation: animation,
       delay: Drupal.settings.simplemenu.hideDelay,
-      speed: Drupal.settings.simplemenu.effectSpeed
+      speed: Drupal.settings.simplemenu.effectSpeed,
+      autoArrows: false
     })
     .find(">li:has(ul)")
       .mouseover(function(){