evanvee
evanvee

Reputation: 315

JQuery Menu Not Working Correctly

I am trying out the Jquery Menu widget and for some reason it is not working. I have tried both in my browser and on JSFiddle (http://jsfiddle.net/evanvee/MANH4/2/).

HTML Code:

<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Page Title</title>
    <link rel="stylesheet" href="template.css"> 
    <link rel="stylesheet" href="includes/jquery/themes/base/jquery.ui.all.css">
    <script src="includes/jquery/jquery.ui.core.js"></script>
    <script src="includes/jquery/jquery-1.9.1.js"></script>
    <script src="includes/jquery/jquery.ui.widget.js"></script>
    <script src="includes/jquery/jquery.ui.position.js"></script>
    <script src="includes/jquery/jquery.ui.menu.js"></script>

    <script>
        $(function() {
            $( "#menu" ).menu();
        });
    </script>
    <style>
        .ui-menu { width: 150px; }
    </style>
</head>
<body>
<div id="container">
    <div id="banner">
        <h1>Page Heading</h1>
    </div>
    <div id="nav">
        <ul id="menu">
            <li class="ui-state-disabled"><a href="#">Aberdeen</a></li>
            <li><a href="#">Ada</a></li>
            <li><a href="#">Adamsville</a></li>
            <li><a href="#">Addyston</a></li>
            <li>
                <a href="#">Delphi</a>
                <ul>
                    <li class="ui-state-disabled"><a href="#">Ada</a></li>
                    <li><a href="#">Saarland</a></li>
                    <li><a href="#">Salzburg</a></li>
                </ul>
            </li>
            <li><a href="#">Saarland</a></li>
            <li>
                <a href="#">Salzburg</a>
                <ul>
                    <li>
                        <a href="#">Delphi</a>
                        <ul>
                            <li><a href="#">Ada</a></li>
                            <li><a href="#">Saarland</a></li>
                            <li><a href="#">Salzburg</a></li>
                        </ul>
                    </li>
                    <li>
                        <a href="#">Delphi</a>
                        <ul>
                            <li><a href="#">Ada</a></li>
                            <li><a href="#">Saarland</a></li>
                            <li><a href="#">Salzburg</a></li>
                        </ul>
                    </li>
                    <li><a href="#">Perch</a></li>
                </ul>
            </li>
            <li class="ui-state-disabled"><a href="#">Amesville</a></li>
        </ul>
    </div>
    <div id="content">
        <p><h2>Page heading</h2></p>
        <p>Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in </p>

    </div>
    <div id="footer">
        Footer stuff here
    </div>
</div>
</body>
</html>

For some reason, the bullets are showing as menu items rather than the actual menu in the example. I am properly missing something fairly easy but can't seem to figure out what the problem is. I haven't deviated from the example at all. Also, I have never had any problems with any JQuery code in the past.

Any help would be greatly appreciated!

Upvotes: 2

Views: 3775

Answers (1)

Francis Kim
Francis Kim

Reputation: 4285

You hadn't included jQuery and jQuery UI in your fiddle:

    $(function() {
        $( "#menu" ).menu();
    });

http://jsfiddle.net/MANH4/7/

Also check your developer console for errors.

Upvotes: 2

Related Questions