jqueryhtmlcsssuperfish

Menu w/ Superfish - Links not working on chrome


I have a menu with jquery plugin superfish. The problem is that the links, in Chrome can't be clicked.

If I deactivate superfish menus work fine. I think it might be either z-index or markup but I can't find the error.


Solution

  • There is some script in onload_frontend.js which is preventing all links from working. Its binding to the click event on all a tags and cancelling the default action which would be to redirect to the url in the href. That code needs to be removed for the links to work.

    $('a').click(function () {
       event.preventDefault();
       return false;
    });
    

    http://api.jquery.com/event.preventDefault/

    The menu links work in IE because the code doesnt work. The following error is raised when a link is clicked so default action is performed; i.e the page is redirected.

    "Object doesn't support property or method 'preventDefault'"
    

    If you use the developer tools in the in IE and set a breakpoint on the code you will see the error.