Page 1 of 1

(small) bug in superfish menu 1

PostPosted: Fri Feb 01, 2013 8:37 pm
by artman
In superfish menu I notice in some browsers in the bottom a error note.
The error is from a js script.
I use the magazine template where superfish is installed.
Find in the header tpl;
Code: Select all
 <script type="text/javascript" src="[[template_dir]]js/hoverIntent.js"></script>
                     <script type="text/javascript" src="[[template_dir]]js/superfish.js"></script>
             <script type="text/javascript" src="[[template_dir]]quickpager.jquery.js"></script>
<script type="text/javascript">
   
      $(document).ready(function(){
         $("ul.sf-menu").superfish();
      });
   
   </script>


The error comr from;
Code: Select all
<script type="text/javascript">
   
      $(document).ready(function(){
         $("ul.sf-menu").superfish();
      });
   
   </script>


If you remove that part of code the menu is still working and give no errors anymore.


Marten

Re: (small) bug in superfish menu 1

PostPosted: Fri Feb 01, 2013 11:31 pm
by Harm10
This is probably due to the fact that currently the $ characters should be replaced by jQuery.
The code should read
Code: Select all
<script type="text/javascript">
   
      jQuery(document).ready(function(){
         jQuery("ul.sf-menu").superfish();
      });
   
   </script>
Could you please verify?

Re: (small) bug in superfish menu 1

PostPosted: Sat Feb 02, 2013 4:50 pm
by artman
Have ad the code to the template there is no error more.
Menu work good.

Although in the admin section is also a browser js error ;
Can put it here of start a new topic.

Marten

Re: (small) bug in superfish menu 1

PostPosted: Sat Feb 02, 2013 5:05 pm
by Harm10
Thanks for reporting. I will change the Magazine theme so new users won't get the same error.

New problem = New post ;)

Re: (small) bug in superfish menu 1

PostPosted: Wed Aug 20, 2014 8:30 pm
by tobeymurphy
Why do you use a plugin for menu, when it can be done in few lines of code by yourself? Here are some examples: jQuery for beginners - JavaScript menu all of them take few lines of code and can be used in different places, top, left, right menu.

Re: (small) bug in superfish menu 1

PostPosted: Wed Aug 20, 2014 9:39 pm
by Harm10
tobeymurphy wrote:Why do you use a plugin for menu, when it can be done in few lines of code by yourself?

Sure, it is not that hard. But you need to be a coder of some kind. If you just want to use PivotX and one of its themes you do not know how to do that (and probably do not want to know).