Bonaval Multimedia

Error JS en Mega Menu en plantillas bajo JA Purity II en el mouseout

MENU

  • Inicio
  • Empresa
    • Quienes somos
    • Noticias
    • KB: Blog IT
  • Soluciones
    • Nuestras soluciones
    • Aplicaciones a medida
    • Soluciones web para la alimentación y congelado
    • Soluciones web para el turismo y los hoteles
    • Comercio on line
    • Movilidad: webs y apps
    • Sistemas GIS
    • Media: Vídeo Streamer, DVD
    • SEO - Posicionamiento en buscadores
    • Diseño y desarrollo web en Joomla CMS
    • Sistemas Expertos: Audiencias TV
  • Servicios
    • Qué ofrecemos
    • Alojamiento Simple y Avanzado
    • Servidor Virtual
    • Atención al cliente
  • Contacto
  • Home
  • KB
  • Desarrollo web
  • Joomla
  • Error JS en Mega Menu en plantillas bajo JA Purity II en el mouseout

Error JS en Mega Menu en plantillas bajo JA Purity II en el mouseout

Cuando se está utilizando una platnilla basada en JA Purity II, y se hace el mouseout de un menu desplegable en un Menu Mega se produce un error Javascript:

li.hasClass is not a function
if (li.hasClass ('haschild-over'))

Line 463: if (li.hasClass ('haschild-over'))


La solución para este error es la siguiente:

  • YOURTEMPLATE/libs/menu/base.class.php - find the following lines:- for me it was line 289: comment out this line and replace with the one that has (true) in the brackets:
    //$v->url = JURI::base();
    $v->url = JURI::base(true).'/';
    - for me it was lines 654 and 660 where you simply need to add the word true:
    (line 554) $itembg = 'style="background-image:url('.JURI::base(true).'/images/stories/'.$iParams->get('menu_image').');"';
    (line 660) $txt = '<span><img src="'.JURI::base(true).'/images/stories/'.$iParams->get('menu_image').'" alt="'.$tmp->name.'" title="'.$tmp->name.'" /></span><span>' . $tmp->name . '</span>';

and the other file you care about is

  • YOURTEMPLATE/js/menu/mega.js- for me it was line 236. Please comment out:
    //if (li.childcontent) li.timer = setTimeout(this.itemHide.bind(this, [li, e]), this.options.delayHide);
    - and replace with this one:
    if (li.childcontent) li.timer = this.itemHide.delay(this.options.delayHide, this, [li, e]);


- - - - - - - - - - - - - - - -

Localizar en templates/PLANTILLA/js/menu/mega.js

línea 236:

Code:
if (li.childcontent) li.timer = setTimeout(this.itemHide.bind(this, [li, e]), this.options.delayHide);

Cambiar a esto: (quitar los corchetes de "li, e")

Code:
if (li.childcontent) li.timer = setTimeout(this.itemHide.bind(this, li, e), this.options.delayHide);


Hope it helps))
Just noticed it works es expected only in Chrome. In other browsers it doesn't animate when hiding. It seems browsers treat differently the use of square brackets. FF, Opera and others take [li, e] as corresponding arguments for itemHide, while Chrome treats [li, e] as one argument, which causes li.hasClass to fail in itemHide.

13 May 2011 | Joomla
  • Anterior

Categorías [KB]

  • Aplicaciones y frameworks (1)
  • Desarrollo web (14)
    • Wordpress (9)
    • Joomla (16)
    • Prestashop (1)
  • Tips & Tricks (5)
  • Cheats (9)
  • Diseño (5)
  • Legal (5)
    • Protección de datos (0)
  • Marketing y publicidad (1)
  • RRHH (1)
  • Redes Sociales (3)
  • Seo (4)
  • Sistemas (2)
    • Bases de datos (0)
      • Mysql (6)
    • Seguridad (1)
    • Correo (9)
    • Debian (4)
    • Plesk (4)
    • Redes (11)
    • Servidor web (5)
      • Apache (6)
  • Sistemas Operativos (1)
    • Linux (18)
    • Windows (4)
 
  • Aviso legal
  • Noticias
  • File Store
  • KB
  • Kit Digital
  • Polícita de Privacidad
  • Política de cookies