伙计们,实际上我想尽快编写此代码,而不是为我的所有 4 个元素单独重写相同的代码,我想编写一个将为每个元素调用并执行的函数。
$(function(){
$('#basic').mouseover(function(){
$('#table-one').css({ boxShadow : "0 0 5px 3px rgba(100,100,200,0.4)" });
});
$('#basic').mouseout(function(){
$('#table-one').css({ boxShadow : "0 0 0 0" });
});
});
$(function(){
$('#standard').mouseover(function(){
$('#table-two').css({ boxShadow : "0 0 5px 3px rgba(100,100,200,0.4)" });
});
$('#standard').mouseout(function(){
$('#table-two').css({ boxShadow : "0 0 0 0" });
});
});
$(function(){
$('#pro').mouseover(function(){
$('#table-three').css({ boxShadow : "0 0 5px 3px rgba(100,100,200,0.4)" });
});
$('#pro').mouseout(function(){
$('#table-three').css({ boxShadow : "0 0 0 0" });
});
});
$(function(){
$('#expert').mouseover(function(){
$('#table-four').css({ boxShadow : "0 0 5px 3px rgba(100,100,200,0.4)" });
});
$('#expert').mouseout(function(){
$('#table-four').css({ boxShadow : "0 0 0 0" });
});
});