source: extensions/Slim/js/menu.js @ 25997

Last change on this file since 25997 was 25997, checked in by Miklfe, 10 years ago
File size: 1.6 KB
RevLine 
[18811]1$(document).ready(function(){
[25997]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();
[19205]14
[18811]15        function megaHoverOver(){
[25997]16                $(this).find('.sub').stop().slideDown(200);
17        };
[18811]18       
19        function megaHoverOut(){
[25997]20         $(this).find('.sub').stop().slideUp(200);
[18811]21        };
22
[25997]23        var $configSub  = {
24                                                over    : megaHoverOver,   
25                                                out             : megaHoverOut     
26                                                };
[18811]27
[25997]28        $('ul#topnav li').hoverIntent($configSub);
29        $('ul#topnav .sub ul li:last-child a').css('border', 'none');
[19205]30
31       
[25997]32        $('.cl_wrapper').hover(function(){
33                if($(this).next('div').is(':hidden')){
34                        $(this).addClass('activate').next('div').slideDown(200).attr(':visible');
[18811]35                }
36        });
37               
[25997]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'); 
[18811]44                }
45        });
46       
[25997]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');
[18811]54                }
55        });
[25997]56
57        $('.close').click(function(){
58                $(this).parent().slideUp(200, function(){
59                                $(this).hide().attr(':hidden')
60                        }).prev().removeClass('activate');
[18811]61        });
[25997]62               
63});
[18811]64       
[19205]65
[18811]66
[19205]67
[25997]68
69
70
71
Note: See TracBrowser for help on using the repository browser.