1 2 3
4
5Sample for JavaScript menu bar
6
7 <styletype=”text/css”> 8 #menuBar {
9 margin: 0;
10 padding: 0;
11 display: table;
12 background-color: #333388;
13 }
14
15 #menuBar div {
16 margin: 0;
17 padding: 0;
18 list-style: none;
19 position: relative;
20 float: left;
21 border-right: 1px #AAAAAA solid;
22 }
23
24 #menuBar div a {
25 display: block;
26 margin: 0;
27 padding: 5px 15px;
28 color: #FFFFFA;
29 text-align: center;
30 text-decoration: none;
31 font-weight: bold;
32 }
33
34 #menuBar div a:hover {
35 background: #5555FF;
36 }
37
38 #menuBar span {
39 margin: 1px;
40 padding: 0;
41 position: absolute;
42 visibility: hidden;
43 white-space: nowrap;
44 display: table;
45 z-index: 3;
46 }
47
48 #menuBar span a {
49 margin: 0;
50 padding: 2px 10px;
51 background: #3333AA;
52 color: #FFFFFA;
53 font-size:90%;
54 text-align: left;
55 text-decoration: none;
56 font-weight: normal;
57 }
58
59 #menuBar span a:hover {
60 background: #5555FF;
61 }
62
63
64 <scripttype=”text/javascript”> 65 //<! [CDATA[ (non-xhtml? remove this line. xhtml? just remove the space between! and [) 66 104 //]]> (non-xhtml? remove this line) 105
106
107
108 109
110
111 <divid=”menuBar”> 112
113
116
117 <spanid=”menu1″onmouseover=”keepMenuOpen()”onmouseout=”closeMenu()”>
118
119
120
121
124
125 <spanid=”menu2″onmouseover=”keepMenuOpen()”onmouseout=”closeMenu()”>
126 <ahref=”http://alexapps.net/Apple/iOS/Apps/MyApps/BoxingiTimer”>Boxing iTimer
127
128 <ahref=”http://alexapps.net/Apple/iOS/Apps/MyApps/GPSAlarms”>GPSAlarms
129 <ahref=”http://alexapps.net/Apple/iOS/Apps/MyApps/GPSAlarmPlus”>GPSAlarm+
130
131
132
133
136
137 <spanid=”menu3″onmouseover=”keepMenuOpen()”onmouseout=”closeMenu()”>
138 <ahref=”http://alexapps.net”>About Us
139 <ahref=”http://alexapps.net/contact.xhtml”>Contact Us
140
141
142
143
144
145 <divstyle=”clear:both”>
146
147
Sample for JavaScript Menu Bar
148
149
150 <divid=”log”style=”font-size: xx-small”/> 151
152
153 http://alexapps.net/HowTo/JavaScript/MenuBar/index.xhtml