[英]Using Google Table inside jqueryui ajax tab
好的,這種情況有點復雜,但是我將盡我所能解釋。
我正在使用Google Ajax Libraries API將jquery和jqueryui放到頁面上,因此頁面頂部看起來像這樣。
<head>
<title>TBTNet</title>
<link rel="stylesheet" type="text/css" href="_css/style.css">
<link rel="stylesheet" type="text/css" href="_css/jquery-ui.css">
<script src="http://www.google.com/jsapi"></script>
<script>
google.load("jquery", "1");
google.load("jqueryui", "1");
google.load('visualization', '1', {packages: ['table']});
</script>
</head>
如您所見,我也在使用Google Visualizations Table API。 在頁面上,我有一個jqueryui選項卡控件,該控件使用AJAX將請求的頁面加載到選項卡中。 在請求的頁面上,我具有相同的html頭,因此具有相同的javascript。 在請求的頁面上有一個google table控件。 在這種情況下運行頁面時,該選項卡顯示空白頁面。 當我自己運行所請求的頁面(不通過ajax調用它)時,google table控件顯示得很好。
我對AJAX相當陌生,所以我可能只是想念一些東西。 任何幫助將不勝感激。
--Kyle
編輯:有人嗎?
答案很簡單,盡管我仍然無法解釋它為什么起作用。 我要做的就是將可視化負載移到兩個jquery之前,現在一切正常。
<head>
<title>TBTNet</title>
<link rel="stylesheet" type="text/css" href="_css/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="_css/style.css">
<script src="http://www.google.com/jsapi"></script>
<script>
google.load('visualization', '1', {packages: ['table']});
google.load("jquery", "1");
google.load("jqueryui", "1");
</script>
<!--<script src="_includes/js/jquery-ui.min.js"></script>-->
</head>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.