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

Last change on this file since 20799 was 19549, checked in by Miklfe, 11 years ago
File size: 2.7 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       
39        // Delete the border for the last li of the submenu
40        $("ul#topnav .sub ul li:last-child a").css("border", "none");
41
42        /*other menubar script*/
43        //open form login menu         
44       
45
46       
47        $(".cl_wrapper").next("div").hide();
48
49       
50        $(".cl_wrapper").hover(function(){
51       
52                if($(this).next("div").is(":hidden")){
53                        $(this).next("div").fadeTo('fast', 1);
54                        $(this).addClass('activate');
55                        $(this).next("div").attr(":visible")
56                }
57        });
58               
59       
60        $(".cl_wrapper").click(function(){
61                if($(this).next("div").is(":visible")){
62                $(this).next("div").fadeTo('slow', 0, function(){$(this).hide()});
63                $(this).removeClass('activate'); 
64                $(this).next("div").attr(":hidden")
65                }
66        });
67
68        $(".close").click(function(){
69                if($("#loger").is(":visible")){
70                        $("#loger").fadeTo('fast', 0, function(){$(this).hide()});
71                        $(".cl_wrapper").removeClass('activate');
72                        $("#loger").attr(":hidden");
73                }
74        });
75       
76        $(".cc_wrapper").click(function(){
77                if($(this).next("div").is(":visible")){
78                        $(this).next("div").fadeTo('slow', 0, function(){$(this).hide()});
79                        $(this).removeClass('activate'); 
80                        $(this).next("div").attr(":hidden")
81                }
82        });
83       
84        $(".cc_wrapper").click(function(){
85                if($(this).next("div").is(":hidden")){
86                        $(this).next("div").fadeTo('fast', 1);
87                        $(this).addClass('activate');
88                        $(this).next("div").attr(":visible")
89                }
90        });
91       
92                $(".close").click(function(){
93                if($("#loger").is(":visible")){
94                        $("#loger").fadeTo('fast', 0, function(){$(this).hide()});
95                        $(".cc_wrapper").removeClass('activate');
96                        $("#loger").attr(":hidden");
97                }
98               
99        });
100       
101       
102       
103
104
105        // make column menubar_categorie
106        $('.mcol').makeacolumnlists({cols:4, colWidth:155, equalHeight: true, startN: 1});
107});
Note: See TracBrowser for help on using the repository browser.