单击时我会更改 div css 样式,然后单击另一个时更改为主要状态。我使用了这段代码,但它只是在单击另一个 div 时重新更改它,这里的代码正在尝试:
$('.mydiv').click(
function() {
$(this).stop().animate({
width:'960px',
backgroundColor : '#000'
}, 500);
}, function () {
$(this).stop().animate({width:'300px', backgroundColor : "green"}, 300);
});