看来这段代码:
$(function(){
$('.show_hide_login').toggle(
function (){
alert('show');
$("div#fullpage").show();
$("div#loginbox").show();
},
function (){
alert('hide');
$("div#loginbox").hide();
$("div#fullpage").hide();
}
); });
Run Code Online (Sandbox Code Playgroud)
当我点击任一链接时(两个,一个是div,一个是锚),任何关于它为什么会运行两次的想法?