打開手風琴項目然後點擊新的手風琴項目後,我希望它先關閉打開的手風琴項目,然後打開新手風琴項目。如何在打開下一個之前關閉jQuery手風琴?
這裏是我當前的代碼:
jQuery('.acclink').click(function() {
jQuery("#accordion").accordion("activate", -1); // this closes anything open
jQuery(jQuery(this).attr('href')).click(); // this is supposed to open the new one but doesn't. It WILL work when the above function is commented out.
return false;
});
這裏是我的網頁:http://www.savedeth.com/objectivescenes/ 我缺少什麼?
不手風琴在默認情況下做到這一點? – 2011-05-26 18:09:50
不完全。它會從上面或下面滑動新的。我希望它完全關閉,然後打開一個新的。 – Dave 2011-05-26 18:13:07
這只是與動畫的速度有關嗎? – 2011-05-27 12:32:14