Jump to content

Jquery pose probleme ?


Recommended Posts

Bonjour !

Le bout de code dans le <head> de header.tpl suivant :



jQuery(function(){
       var SelfLocation = [removed].href.split('?');
       switch (SelfLocation[1]) {
         case "justify_right":
           jQuery(".megamenu").megamenu({ 'justify':'right' });
           break;
         case "justify_left":
         default:
           jQuery(".megamenu").megamenu();
       }
     });




Me donne ce résultat :

Fatal error: Smarty error: [in /var/www/aki/themes/prestashop/header.tpl line 29]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 590) in /var/www/aki/tools/smarty/Smarty.class.php on line 1095


Je veut essaye d'ajouter un menu style mega dropdown.

Je sais qu'l existe un module tout fait mais j'ai pas un rond ! XD

Merci !

Link to comment
Share on other sites

au hasard.
essaye de mettre {literal}...{/literal} entre tes balises script

[removed]
{literal}
jQuery(function(){
       var SelfLocation = [removed].href.split('?');
       switch (SelfLocation[1]) {
         case "justify_right":
           jQuery(".megamenu").megamenu({ 'justify':'right' });
           break;
         case "justify_left":
         default:
           jQuery(".megamenu").megamenu();
       }
     }); 
{/literal}
[removed]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...