Ignore:
Timestamp:
Nov 28, 2012, 11:25:45 AM (11 years ago)
Author:
Miklfe
Message:
 
File:
1 edited

Legend:

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

    r18811 r19205  
    55 */
    66$(document).ready(function(){
    7                
     7
     8        $("li.liSub:last-child dt").addClass('dd_wrapper');
     9        $("li.liSub:last-child dd").addClass('sub');
     10
     11
     12
    813        function megaHoverOver(){
    9                 $(this).find(".sub").stop().fadeTo('fast', 1).show();
     14                $(this).find(".sub").stop().fadeTo('slow', 1).show();
    1015                       
    1116        }
    1217       
    1318        function megaHoverOut(){
    14          $(this).find(".sub").stop().fadeTo('fast', 0, function() {
     19         $(this).find(".sub").stop().fadeTo('slow', 0, function() {
    1520                  $(this).hide();
    1621          });
     
    1823
    1924
    20         var config = {
    21                  sensitivity: 1,                // number = sensitivity threshold (must be 1 or higher)   
     25        var configSub = {
     26                 sensitivity: 2,                // number = sensitivity threshold (must be 1 or higher)   
    2227                 interval: 0,                   // number = milliseconds for onMouseOver polling interval   
    2328                 over: megaHoverOver,   // function = onMouseOver callback (REQUIRED)   
     
    2732
    2833        $("ul#topnav li .sub").css({'opacity':'0'});
    29         $("ul#topnav li").hoverIntent(config);
     34        $("ul#topnav li").hoverIntent(configSub);
    3035       
     36        var configSwitch = {
     37                 sensitivity: 2,                // number = sensitivity threshold (must be 1 or higher)   
     38                 interval: 0,                   // number = milliseconds for onMouseOver polling interval   
     39                 over: switchBoxOver,   // function = onMouseOver callback (REQUIRED)   
     40                 timeout: 0,                    // number = milliseconds delay before onMouseOut   
     41                 out: switchBoxOut              // function = onMouseOut callback (REQUIRED)   
     42        };
    3143
     44        function switchBoxOver(){
     45                $(this).find(".switchBox").stop().fadeTo('slow', 1).show();
     46                       
     47        }
     48       
     49        function switchBoxOut(){
     50         $(this).find(".switchBox").stop().fadeTo('slow', 0, function() {
     51                  $(this).hide();
     52          });
     53        }
     54        $("ul.categoryActions li").hoverIntent(configSwitch);
     55
     56       
    3257        // Delete the border for the last li of the submenu
    3358        $("ul#topnav .sub ul li:last-child a").css("border", "none");
    3459
    3560        /*other menubar script*/
    36         //open form login menu
    37                 $(".cl_wrapper").next("div").hide();
     61        //open form login menu         
     62       
     63
     64       
     65        $(".cl_wrapper").next("div").hide();
    3866
    3967       
     
    4169       
    4270                if($(this).next("div").is(":hidden")){
    43                         $(this).next("div").fadeTo('fast',1);
     71                        $(this).next("div").fadeTo('fast', 1);
    4472                        $(this).addClass('activate');
    4573                        $(this).next("div").attr(":visible")
     
    80108        });
    81109       
     110
    82111       
    83         // make column menubar_categorie
    84         $('.mcol').makeacolumnlists({cols:4, colWidth:155, equalHeight: true, startN: 1});
    85112       
    86113       
    87114
     115
     116        // make column menubar_categorie
     117        $('.mcol').makeacolumnlists({cols:4, colWidth:155, equalHeight: true, startN: 1});
    88118});
Note: See TracChangeset for help on using the changeset viewer.