How can I create a menu using an existing UL from a large HTML file called index.html? Here is the code snippet:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Menu - Default functionality</title>
<script type="text/javascript" src="jquery-1.8.3.min.js"> </script>
<script type="text/javascript" src="menu.js"> </script>
<style type="text/css">
.ui-menu { width: 150px; }
</style>
</head>;
<body>
<ul id="menu">
...
</ul>;
</body>
</html>
;
But when I try to call the menu function in my menu.js file, it throws an error at runtime.
In my menu.js file, I only have a document ready function:
$(document).ready(function(){
$('#menu').menu({
});
});
;
Does anyone have any ideas on how to fix this?
;
Thank you for all your responses.
I downloaded the package but it contains too many files...
I tried using jquery-ui-1.10.4.custom.js and jquery.ui.menu.js, but it still doesn't convert my UL list to a menu. Am I missing something else?
Here is the order of my script tags:
<script type="text/javascript" src="jquery-1.8.3.min.js"> </script>
<script type="text/javascript" src="jquery-ui-1.10.4.custom.js"> </script>
<script type="text/javascript" src="menu.js"> </script>