0
我會改變div CSS樣式,當點擊時,然後改變到它的主要狀態,當點擊另一個。 我用這個代碼,但它只是重新改變它,當點擊另一個div 這裏的代碼正在嘗試:如何更改div風格,當點擊到另一個
$('.mydiv').click(
function() {
$(this).stop().animate({
width:'960px',
backgroundColor : '#000'
}, 500);
}, function() {
$(this).stop().animate({width:'300px', backgroundColor : "green"}, 300);
});
或彩色動畫插件 – PitaJ 2012-08-09 23:11:06
我需要的是改變點擊的div寬度:300像素,當我在另一個DIV – 2012-08-10 00:02:13
@AmineKacem點擊 - 很簡單,更新了我的答案嗎? – adeneo 2012-08-10 00:06:29