2013-08-24 147 views

回答

1

只是檢查,看看是否點擊的元素是在手風琴或不

$(document).click(function(e) { 
    if (!$("#acc").is(e.target) && !$("#acc").has(e.target).length) { 
     $('#acc').accordion('activate', -1); 
    } 
}); 

http://jsfiddle.net/2DaR6/202/

+0

但如果你想這個腳本來排除其他的什麼無關DIV? –

相關問題