Solved

jQuery - superfish menu - sfTimer error.

Posted on 2014-12-27
4
231 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:knowlton
  • 3
4 Comments
 
LVL 5

Author Comment

by: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:knowlton
ID: 40520694
Understood.

Thank you.
0
 
LVL 5

Author Closing Comment

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

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Introduction Got endorsements from your clients?  Great!  There is almost nothing better than word-of-mouth advertising.  But how can you do that on the internet?  Sure you can make a page for endorsement quotations and list them all, but who is …
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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)

762 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now