each line is a mi (menuitem) and has one mii (menu-item-icon) whcih is ms (menu-spacer)
and one mic (menu-item-chunk)
indenting is done with the levels s0, s1, s2 */
-#html-menu { float:left; width: 183px; font-size: 8pt; margin-top: 10px; }
+#content.html-menu, #html-menu {
+ transition: margin-left 0.2s, width 0.2s;
+ -moz-transition: margin-left 0.2s, width 0.2s;
+ -webkit-transition: margin-left 0.2s, width 0.2s;
+ -o-transition: margin-left 0.2s, width 0.2s;
+}
+#content.html-menu { margin-left: 190px; }
+#content.html-menu.folded { margin-left: 40px }
+#html-menu.folded:hover + #content.html-menu.folded { margin-left: 190px }
+#html-menu { float:left; width: 183px; font-size: 8pt; margin-top: 10px; overflow:hidden; }
+#html-menu.folded { width: 32px; }
+#html-menu.folded:hover { width: 183px; }
#html-menu div.mi { margin-top: 4px; margin-bottom: 3px; white-space: nowrap; clear:both; position:relative; }
#html-menu div.sm { font-weight: bold }
#html-menu img { vertical-align: top; border: 0; }
#html-menu div.s0 { padding-left: 2px }
#html-menu div.s1 { padding-left: 8px }
#html-menu div.s2 { padding-left: 16px }
-#content.html-menu { margin-left: 190px }
body { margin: 0 }
-var vSwitch_Menu = 1;
-var Frame;
-var FrameSize;
-
+var vSwitch_Menu = 0;
function Switch_Menu() {
- if (Frame) {
- Frame.attr('cols',vSwitch_Menu ? '30,*' : FrameSize);
- vSwitch_Menu=!vSwitch_Menu;
+ vSwitch_Menu=!vSwitch_Menu;
+ SetMenuFolded(vSwitch_Menu);
+ $.cookie('html-menu-folded', vSwitch_Menu);
+}
+function SetMenuFolded(on) {
+ if (on) {
+ $('#html-menu').removeClass('folded');
+ $('#content').removeClass('folded');
+ } else {
+ $('#html-menu').addClass('folded');
+ $('#content').addClass('folded');
}
}
-
$(function(){
- Frame = $(parent.document.getElementById('menuframe'));
- FrameSize = Frame.attr('cols');
+ vSwitch_Menu = $.cookie('html-menu-folded');
+ SetMenuFolded(vSwitch_Menu);
})