下拉菜单更改

时间:2012-05-16 10:54:33

标签: jquery menu drop-down-menu

大家好,我是网络编程的新手,我的代码有问题:

$(document).ready(function(){
$("#adminBox").parent().append("<span></span>");    
$("a.adlog:link").click(function() { 
    $(this).parent().find("#adminBox").slideDown('fast').show();
    $(this).parent().hover(function() {
    }, function(){  
        $(this).parent().find("#adminBox").slideUp('slow'); //here i want to change...
    });
    }).hover(function() { 
        $(this).addClass("a.adlog:hover");
    }, function(){
        $(this).removeClass("a.adlog:hover");
});
});


我想更改点击("#adminBox").slideUp('slow')时处理$("a.adlog:link")的方式。

1 个答案:

答案 0 :(得分:1)

试试这个。

$(document).ready(function(){
$("#adminBox").parent().append("<span></span>");   

$(".adlog").click(function() { 
    $(this).parent().find("#adminBox").slideDown('fast');
})

$(".adlog").parent().hover(function() {
    }, function(){  
        $(this).parent().find("#adminBox").slideUp('slow'); //here you want to change...
});


$(".adlog").hover(function() { 
        $(this).addClass("adlogHover");
    }, function(){
        $(this).removeClass("adlogHover");
});

});
相关问题