Explorar el Código

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 hace 16 años
padre
commit
202280fa6b
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  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
   // get the element to add the menu to
   var element = Drupal.settings.simplemenu.element;
   var element = Drupal.settings.simplemenu.element;
-  var menu = $(simplemenu).attr("id", "simplemenu").addClass('clear-block');
+  var menu = $(simplemenu);
 
 
   switch (Drupal.settings.simplemenu.placement) {
   switch (Drupal.settings.simplemenu.placement) {
     case 'prepend':
     case 'prepend':
@@ -33,11 +33,13 @@ Drupal.behaviors.simplemenuAttach = function(context) {
   
   
   // Build menu
   // Build menu
   $(menu)
   $(menu)
+    .find('#simplemenu')
     .superfish({
     .superfish({
       pathClass: 'current',
       pathClass: 'current',
       animation: animation,
       animation: animation,
       delay: Drupal.settings.simplemenu.hideDelay,
       delay: Drupal.settings.simplemenu.hideDelay,
-      speed: Drupal.settings.simplemenu.effectSpeed
+      speed: Drupal.settings.simplemenu.effectSpeed,
+      autoArrows: false
     })
     })
     .find(">li:has(ul)")
     .find(">li:has(ul)")
       .mouseover(function(){
       .mouseover(function(){