隱藏某個DIV時觸發某個功能的最佳方法是什麼?隱藏某個元素時的jQuery觸發功能
我想在元素被隱藏時從頁面中銷燬一些Flash對象,並在顯示元素時重新創建它們。
例如
<div id="flashContainer> // flash object </div>
$("#flashContainer).hide(); //trigger function that destroys the flash object
$("#flashContainer).show(); //trigger function that creates the flash object
背景:
我想這樣做的原因是,我有一個很長的網頁,有一些導航是「臺階throught」申報單,如果他們的網頁。在IE中,所有這些隱藏的div加載了閃光燈並開始下載視頻,在這個過程中
這將只顯示容器我之前已經創建您的閃光燈
flashcontainer
將顯示隱藏,我需要觸發一個事件時,某些類型(由類定義)的DIV顯示/隱藏 – Keeno 2011-01-14 15:13:27然後你需要的是一個IF語句,和/或一個setInterval函數來檢查DIV是否:隱藏 – benhowdle89 2011-01-14 15:16:55