source: extensions/Full_Background/js/menu.js @ 19210

Last change on this file since 19210 was 19210, checked in by Miklfe, 11 years ago
File size: 3.4 KB
Line 
1/*
2 * jQuery Mega Drop Down Menu script by Soh Tanaka
3 * http://www.sohtanaka.com/web-design/mega-drop-downs-w-css-jquery/
4 *
5 */
6$(document).ready(function(){
7
8        $("#page_content #nav_wrapper").css("display", "none");
9
10        $("li.liSub:last-child dt").addClass('dd_wrapper');
11        $("li.liSub:last-child dd").addClass('sub');
12
13
14
15        function megaHoverOver(){
16                $(this).find(".sub").stop().fadeTo('slow', 1).show();
17                       
18        }
19       
20        function megaHoverOut(){
21         $(this).find(".sub").stop().fadeTo('slow', 0, function() {
22                  $(this).hide();
23          });
24        }
25
26
27        var configSub = {
28                 sensitivity: 2,                // number = sensitivity threshold (must be 1 or higher)   
29                 interval: 0,                   // number = milliseconds for onMouseOver polling interval   
30                 over: megaHoverOver,   // function = onMouseOver callback (REQUIRED)   
31                 timeout: 0,                    // number = milliseconds delay before onMouseOut   
32                 out: megaHoverOut              // function = onMouseOut callback (REQUIRED)   
33        };
34
35        $("ul#topnav li .sub").css({'opacity':'0'});
36        $("ul#topnav li").hoverIntent(configSub);
37       
38        var configSwitch = {
39                 sensitivity: 2,                // number = sensitivity threshold (must be 1 or higher)   
40                 interval: 0,                   // number = milliseconds for onMouseOver polling interval   
41                 over: switchBoxOver,   // function = onMouseOver callback (REQUIRED)   
42                 timeout: 0,                    // number = milliseconds delay before onMouseOut   
43                 out: switchBoxOut              // function = onMouseOut callback (REQUIRED)   
44        };
45
46        function switchBoxOver(){
47                $(this).find(".switchBox").stop().fadeTo('slow', 1).show();
48                       
49        }
50       
51        function switchBoxOut(){
52         $(this).find(".switchBox").stop().fadeTo('slow', 0, function() {
53                  $(this).hide();
54          });
55        }
56        $("ul.categoryActions li").hoverIntent(configSwitch);
57
58       
59        // Delete the border for the last li of the submenu
60        $("ul#topnav .sub ul li:last-child a").css("border", "none");
61
62        /*other menubar script*/
63        //open form login menu         
64       
65
66       
67        $(".cl_wrapper").next("div").hide();
68
69       
70        $(".cl_wrapper").hover(function(){
71       
72                if($(this).next("div").is(":hidden")){
73                        $(this).next("div").fadeTo('fast', 1);
74                        $(this).addClass('activate');
75                        $(this).next("div").attr(":visible")
76                }
77        });
78               
79       
80        $(".cl_wrapper").click(function(){
81                if($(this).next("div").is(":visible")){
82                $(this).next("div").fadeTo('slow', 0, function(){$(this).hide()});
83                $(this).removeClass('activate'); 
84                $(this).next("div").attr(":hidden")
85                }
86        });
87
88        $(".close").click(function(){
89                if($("#loger").is(":visible")){
90                        $("#loger").fadeTo('fast', 0, function(){$(this).hide()});
91                        $(".cl_wrapper").removeClass('activate');
92                        $("#loger").attr(":hidden");
93                }
94        });
95       
96        $(".cc_wrapper").click(function(){
97                if($(this).next("div").is(":visible")){
98                        $(this).next("div").fadeTo('slow', 0, function(){$(this).hide()});
99                        $(this).removeClass('activate'); 
100                        $(this).next("div").attr(":hidden")
101                }
102        });
103       
104        $(".cc_wrapper").click(function(){
105                if($(this).next("div").is(":hidden")){
106                        $(this).next("div").fadeTo('fast', 1);
107                        $(this).addClass('activate');
108                        $(this).next("div").attr(":visible")
109                }
110        });
111       
112                $(".close").click(function(){
113                if($("#loger").is(":visible")){
114                        $("#loger").fadeTo('fast', 0, function(){$(this).hide()});
115                        $(".cc_wrapper").removeClass('activate');
116                        $("#loger").attr(":hidden");
117                }
118               
119        });
120       
121       
122       
123
124
125        // make column menubar_categorie
126        $('.mcol').makeacolumnlists({cols:4, colWidth:155, equalHeight: true, startN: 1});
127});
Note: See TracBrowser for help on using the repository browser.