簡體   English   中英

jquery.ui.tabs.js不會在IE9,Chrome中加載標簽數據-在Firefox中工作正常

[英]jquery.ui.tabs.js doesn't load tab data in IE9, Chrome - works perfectly fine in firefox

我在網站上遇到的問題很少,我也不知道如何解決。

請轉到http://link.zambeel.ca/index.php/component/obituary/detail/52並單擊“照片”選項卡,它不會在IE9和Chrome中立即加載圖像。 我使用以下代碼在firefox中使其工作:

var loadNextTab = function() {
if (indexesToLoad.length == 0) return;
var index = indexesToLoad.shift();
$("#tabs-1").tabs("load",index);
};

$("#tabs-1").tabs({
cache: true,
load: loadNextTab
});

請幫助我盡快解決此問題。

只是讓大家知道,我絕對不是程序員。

當我訪問您在IE 9上發布的URL時,它使我在錯誤控制台中看到以下錯誤。

Unable to get value of the property 'tabs': object is null or undefined

現在,如果在加載HTML之前加載JavaScript,通常會出現此錯誤。 為了防止這種情況,請將以上所有代碼置於ready事件中,如下所示:

$(document).ready(function() {
  // All code you posted above should come in here which initializes the tabs.
});

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM