Solved

jQuery - superfish menu - sfTimer error.

Posted on 2014-12-27
4
295 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
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…
The viewer will learn how to dynamically set the form action using jQuery.
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)
Suggested Courses

628 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