1:- module(menu, [wl_menu//1]).
5:- use_module(library(http/html_write)). 6:- use_module(library(http/html_head)). 7:- use_module(library(http/js_write)). 8
9:- ensure_loaded(weblog(resources/resources)). 10
11/** wl_menu(+ID)// is det
12
13Turns the object with id ID into a hierarchical menu.
14
15Usually ID is a ul item, and it turns the entire list into a
16hierarchical menu.
17
18 ==
19
20 \wl_menu(mymenu),
21 ul(id(mymenu), [
22 li(a(href(#), 'Menu 1')),
23 li([a(href(#), 'Has Submenu'),
24 ul([
25 li(a(href(#), 'Sub 1')),
26 li(a(href(#), 'Sub 2'))
27 ])])])
28
29 ==
30
31
32*/
33
34wl_menu(ID) -->
35 html([
36 \html_requires(jquery_ui),
37 \html_requires(menu_css),
38 \html_post(head,
39 \js_script({| javascript(ID)
Tools for the jqueryui menu widget
*/