我有一張基於圖像數組的圖像幻燈片,該圖像在我的頁面上提供一個img元素。當我到達最後一幅圖像並按下「下一個」觸發nextImage()函數時,我想隱藏我的最終圖像並調出一個啓動畫面(同一頁面上的一個div,被css隱藏)。這段代碼在safari中效果很好,但它似乎並沒有隱藏iPad(我的目標設備)上的圖像元素。我不知道什麼可能會導致這種行爲不起作用。.hide()在iPad上無法正常工作
function endPresentation(){
$("#image").hide(200);
$("#test").show(200);
}
//Goto Next image in array
function nextImage(){
save();
iCount++;
//If there are no more images in the array
if (images[iCount] == null) {
endPresentation();
}
else{
//Change image source to new image, do stuff after the image has successfully loaded
$("#image").attr("src", images[iCount]).load(function(){
doStuff();
});
}
}
任何幫助將不勝感激,因爲這已經困擾了我幾個星期!
我已確定,該問題是與在.show定時器()和隱藏( )。 它似乎iPad不喜歡動畫。 我會離開這個開放,因爲現在我有它的動畫會很好,爲了將來的參考,這是在iPad3上進行測試。 – FunkyMonk91