当被点击的div处于活动状态时,有没有办法禁止点击其他div?
我正在使用
JQuery.thoggle()
作用
JQuery(JQuery)
对于左侧的两个div:
$(document).ready(function() {
$('.move_box_left_up').toggle(function() {
$(this).css({"z-index":"20"});
$(this).animate({"height": "529px", "width": "460px"}, "slow");
$(this).find('img').animate({"width": "460px"}, "slow");
},function() {
$(this).find('img').animate({"width": "220px"}, "slow");
$(this).animate({"height": "163px", "width": "220px"}, "slow");
setTimeout( function(){$('.move_box_left_up').css({"z-index":"10"});},500);
})
});
JQuery(JQuery)
对于两个右侧div:
$(document).ready(function() {
$('.move_box_right_up').toggle(function() {
$(this).css({"z-index":"20"});
$(this).animate({"height": "529px", "width": "460px", "left":"-=240px"},"slow");
$(this).find('img').animate({"width": "460px"}, "slow");
},function() {
$(this).find('img').animate({"width": "220px"}, "slow");
$(this).animate({"height": "163px", "width": "220px","left":"+=240px"}, "slow");
setTimeout( function(){$('.move_box_right_up').css({"z-index":"10"});},500);
})
});
JSFiddle
.