source: extensions/PwgCarbon_dft/js/menu.js @ 25992

Last change on this file since 25992 was 25992, checked in by Miklfe, 10 years ago
File size: 1.6 KB
Line 
1$(document).ready(function(){
2        $('.mcol').columnize({ columns: 4});
3        $.each($('.mcol li'), function() {
4                var $li = $(this),
5                        $test=$li.find('a');
6                if($test.length == 0){
7                        $li.remove()
8                }
9        })
10       
11        $('li.liSub:last-child dt').addClass('dd_wrapper');
12        $('li.liSub:last-child dd').addClass('sub');
13        $('ul#topnav li .sub').hide();
14
15        function megaHoverOver(){
16                $(this).find('.sub').stop().slideDown(200);
17        };
18       
19        function megaHoverOut(){
20         $(this).find('.sub').stop().slideUp(200);
21        };
22
23        var $configSub  = {
24                                                over    : megaHoverOver,   
25                                                out             : megaHoverOut     
26                                                };
27
28        $('ul#topnav li').hoverIntent($configSub);
29        $('ul#topnav .sub ul li:last-child a').css('border', 'none');
30
31       
32        $('.cl_wrapper').hover(function(){
33                if($(this).next('div').is(':hidden')){
34                        $(this).addClass('activate').next('div').slideDown(200).attr(':visible');
35                }
36        });
37               
38        $('.cl_wrapper').click(function(){
39                if($(this).next('div').is(':visible')){
40                        $(this).next('div').slideUp(200, function(){
41                                $(this).hide()
42                        });
43                        $(this).removeClass('activate').next('div').attr(':hidden'); 
44                }
45        });
46       
47        $('.cc_wrapper').click(function(){
48                if($(this).next('div').is(':visible')){
49                        $(this).removeClass('activate').next('div').slideUp(200, function(){
50                                $(this).hide().attr(':hidden');
51                        });
52                } else {
53                        $(this).next('div').slideDown(200).attr(':visible');
54                }
55        });
56
57        $('.close').click(function(){
58                $(this).parent().slideUp(200, function(){
59                                $(this).hide().attr(':hidden')
60                        }).prev().removeClass('activate');
61        });
62               
63});
64       
65
66
67
68
69
70
71
Note: See TracBrowser for help on using the repository browser.