Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想检查我是否单击了某个元素或另一个:
((delete_box) || (man)).click(function(){ overlay.fadeIn('fast',function(){ box_2.animate({'top':'200px'},500); }); });
使用此代码,它只会拾取变量 man 而不是删除框。
有什么帮助吗?
尝试
$(delete_box).add(man).click(function(){ overlay.fadeIn('fast',function(){ box_2.animate({'top':'200px'},500); }); });
或者
$([delete_box,man]).click({..});)