Ignore:
Timestamp:
Dec 17, 2013, 11:33:32 PM (10 years ago)
Author:
Miklfe
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/Full_Background/js/menu.js

    r19549 r25999  
    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  */
    61$(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();
    714
    8         $("#page_content #nav_wrapper").css("display", "none");
     15        function megaHoverOver(){
     16                $(this).find('.sub').stop().slideDown(200);
     17        };
     18       
     19        function megaHoverOut(){
     20         $(this).find('.sub').stop().slideUp(200);
     21        };
    922
    10         $("li.liSub:last-child dt").addClass('dd_wrapper');
    11         $("li.liSub:last-child dd").addClass('sub');
     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       
    1265
    1366
    1467
    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         }
    2568
    2669
    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        
    10370
    10471
    105         // make column menubar_categorie
    106         $('.mcol').makeacolumnlists({cols:4, colWidth:155, equalHeight: true, startN: 1});
    107 });
Note: See TracChangeset for help on using the changeset viewer.