Solved

jQuery - superfish menu - sfTimer error.

Posted on 2014-12-27
4
278 Views
Last Modified: 2014-12-28
I am using jQuery's "superfish" for the menu on my website

While debugging I notice that I get these errors as I hover over the menu items:

sftimer
Website URL:  http://www.utahkidsfoundation.com


The error does not seem to happen for top menu items that don't have sub items.  It seems to happen onEnter and onExit (hovering over a menu item then leaving).

I just need some help debugging.


Here is the raw HTML that superfish converts into the menu:

<ul id="ukfmenu" class="sf-menu sf-js-enabled sf-arrows" style="padding-left:166px;padding-top:28px;font-family: Geneva, Arial, Helvetica, sans-serif, sans-serif;font-size:15px;font-weight:bold;">
    <li>
        <a href="Default.aspx">Home</a>       
    </li>
   <li class="current">
        <a href="About.aspx">About</a>
        <ul>
            <li>
                <a href="OurMission.aspx">Our Mission</a>
            </li>
            <li>
                <a href="MeetOurBoard.aspx">Meet Our Board</a>
               <%-- <ul style="display: none;">
                    <li class="current"><a href="#">menu item</a></li>
                    <li><a href="#aba">menu item</a></li>
                    <li><a href="#abb">menu item</a></li>
                    <li><a href="#abc">menu item</a></li>
                    <li><a href="#abd">menu item</a></li>
                </ul>--%>
            </li>
            <li>
                <a href="OurKidsInTheNews.aspx">Our Kids in the News</a>               
            </li>
            <li>
                <a href="ForumRules.aspx">Forum Rules</a>               
            </li>
        </ul>
    </li>
   <li class="current">
        <a href="Projects.aspx">Projects</a>
        <ul>
            <li>
                <a href="MommyCarePackage.aspx">Mommy Care Package</a>
            </li>           
            <li>
                <a href="MeetOurUtahKids.aspx">Meet Our Utah Kids</a>               
            </li>
            <li>
                <a href="MedicalSupplyExchange.aspx">Medical Supply Exchange</a>               
            </li>
             <li>
                <a href="HealthAndSafety.aspx">Health and Safety</a>               
            </li>
             <li>
                <a href="ListOfNonProfits.aspx">List of Non-Profits</a>               
            </li>
        </ul>
    </li>
    <li class="current">
        <a href="Sponsorship.aspx">Sponsorship</a>
        <ul>
            <li>
                <a href="HowYouCanHelp.aspx">How You Can help</a>
            </li>               
        </ul>
    </li>
    <li>
        <a href="Events.aspx">Events</a>       
    </li>
     <li>
        <a href="Donate.aspx">Donate</a>       
    </li>
     <li>
        <a href="Contact.aspx">Contact</a>       
    </li>
</ul>

Open in new window

0
Comment
Question by:Tom Knowlton
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 40519862
Update:

The error goes away if I remove this class from the HTML markup:

sf-js-enabled

But I still don't know what is wrong.
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 40519981
The author itslef give you the answer here : https://github.com/joeldbirch/superfish/issues/88#issuecomment-21088662

joeldbirch commented on 16 Jul 2013 :
I've found that the cause of this is that you should not be adding the sf-js-enabled sf-arrows classes to the HTML. Superfish needs to add those dynamically as it initialises. If they are present prior to Superfish initialisation then chaos ensues.
0
 
LVL 5

Author Comment

by:Tom Knowlton
ID: 40520694
Understood.

Thank you.
0
 
LVL 5

Author Closing Comment

by:Tom Knowlton
ID: 40520695
Excellent answer, as usual, by leakim971.  : )
0

Featured Post

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
JavaScript can be used in a browser to change parts of a webpage dynamically. It begins with the following pattern: If condition W is true, do thing X to target Y after event Z. Below are some tips and tricks to help you get started with JavaScript …
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question