|
|
Line 125: |
Line 125: |
| $(function() { | | $(function() { |
| | | |
- | $(".selflink").parent("li").children("ul").css("display","block");
| + | $(".selflink").parent("li").children("ul").css("display","block"); |
| | | |
- | var menu = document.getElementById("side_menu_items");
| + | }); |
- | if (menu==null) return;
| + | |
- | var menu_items = menu.childNodes;
| + | |
- | for (var i=0; i< menu_items.length; i++) {
| + | |
- | if (menu_items[i].tagName == "LI") {
| + | |
- | var children = menu_items[i].childNodes;
| + | |
- | for (var j=0; j< children.length; j++) {
| + | |
- | if (children[j].tagName == "A") {
| + | |
- | children[j].onmouseover = (function() {
| + | |
- | var children1 = children;
| + | |
- | return function() {
| + | |
- | for (var j=0; j< children1.length; j++) {
| + | |
- | if (children1[j].tagName == "UL") {
| + | |
- | children1[j].style.display="block";
| + | |
- | }
| + | |
- | }
| + | |
- | }
| + | |
- | })();
| + | |
- | }
| + | |
- | if (children[j].tagName == "UL") {
| + | |
- | //var grandchildren = children[j].childNodes;
| + | |
- | //for (var k=0; k < grandchildren.length; k++) {
| + | |
- | // if (grandchildren[k].tagName == "LI") {
| + | |
- | children[j].onmouseout = (function() {
| + | |
- | var item = menu_items[i];
| + | |
- | return function() {
| + | |
- | var ch = item.childNodes;
| + | |
- | for (var l=0; l< ch.length; l++) {
| + | |
- | if (ch[l].tagName == "UL") {
| + | |
- | ch[l].style.display= "none";
| + | |
- | }
| + | |
- | }
| + | |
- |
| + | |
- | }
| + | |
- | })();
| + | |
- | children[j].onmousemove = (function() {
| + | |
- | var item = menu_items[i];
| + | |
- | return function() {
| + | |
- | var chi = item.childNodes;
| + | |
- | for (var l=0; l< chi.length; l++){
| + | |
- | if (chi[l].tagName == "UL") {
| + | |
- | chi[l].style.display="block";
| + | |
- | }
| + | |
- | }
| + | |
- |
| + | |
- | }
| + | |
- | })();
| + | |
- | //}
| + | |
- | // }
| + | |
- | }
| + | |
- | }
| + | |
- | }
| + | |
- | }
| + | |
- | });
| + | |
| | | |
| $(function() { | | $(function() { |
Line 188: |
Line 135: |
| } | | } |
| }); | | }); |
- |
| |
- | function getScrollTop() {
| |
- | if (typeof window.pageYOffset !== 'undefined' ) {
| |
- | // Most browsers
| |
- | return window.pageYOffset;
| |
- | }
| |
- |
| |
- | var d = document.documentElement;
| |
- | if (d.clientHeight) {
| |
- | // IE in standards mode
| |
- | return d.scrollTop;
| |
- | }
| |
- |
| |
- | // IE in quirks mode
| |
- | return document.body.s;
| |
- | }
| |
| | | |
| $(function() { | | $(function() { |