2015-03-31 128 views
0

如果你看看我的網站www.tripleflowmusic.com,一旦加載頁面,Twitter的插件其他HTML文檔中加載(Updates.html)到容器的下面的代碼的幫助(jQuery的):爲什麼twitter插件(widget)不顯示?

$(document).ready(function() { 
    $("#subpageframe").load('Pages/Updates.html', function(){ 
     $("#subpageframe").fadeIn(200); 

但是當我點擊新聞按鈕,它做以下的事情(這基本上是重新加載Updates.html容器):

$("#UpdatesButton").click(function() { 
    $("#subpageframe").fadeOut(200, function() { 
     $("#subpageframe").load('Pages/Updates.html', function(){ 
      $("#subpageframe").fadeIn(200); 

Twitter的插件將不會顯示

的問題是,爲什麼這是否發生?

P.S.要訪問子頁面,只需從地址欄中的URL中刪除「#」

回答

0

你的iframe和格式是不是有喜歡它的網頁上。此代碼是在首頁,但從未在http://www.tripleflowmusic.com/#Pages/Updates.html

<iframe id="twitter-widget-0" scrolling="no" frameborder="0" allowtransparency="true" class="twitter-timeline twitter-timeline-rendered" allowfullscreen="" style="border: none; max-width: 100%; min-width: 180px; margin: 0px; padding: 0px; display: inline-block; position: static; visibility: visible; width: 520px;" title="Twitter Timeline" height="600"></iframe> 

您在新聞頁,而不是正確的

<center data-twttr-id="twttr-sandbox-0"> 

格式有一定的「一類」和「風格」。

+0

我不明白你的意思,對不起,我使用的代碼是在Twitter網站上生成的。 http://www.tripleflowmusic.com/Pages/Updates.html 另外我沒有在我的網站上使用iframe – Max 2015-04-01 04:45:51

0

對於我而言,在OS X上的Safari和Chrome上都可以正常顯示,您可以更具體地瞭解您使用的瀏覽器和操作系統?

雖然我們在這你可能要清理一些正在拋出的錯誤:

Failed to load resource: the server responded with a status of 404 (Not  Found) 
http://www.tripleflowmusic.com/FunctionElements/MusicPlayer/Covers/missing.jpg Failed to load resource: the server responded with a status of 404 (Not Found) 

http://www.tripleflowmusic.com/MediaElements/MusicPlayer/Songs/nylmbyb.mp3 Failed to load resource: the server responded with a status of 404 (Not Found) 
+0

我使用了Chrome和Firefox,您是否點擊了新聞按鈕? Button基本上重新加載了名爲「subpageframe」的容器中的「Updates.html」頁面。第一次當您訪問該網站時,jQuery在文檔準備好並顯示時將「Updates.html」加載到「subpageframe」中。問題是,在我點擊新聞後,twitter插件不會出現:( 是的,在這種情況下,它很好,它只是試圖加載一個虛假的大頭貼,它是頁面加載時播放器的封面,我刪除了從現在的服務器:) – Max 2015-04-01 04:21:43

+0

是的,它總是出現在這裏,當我reaload它---> http://www.tripleflowmusic.com/Pages/Updates.html,它只有當我重新加載它內我的網站上的「subpageframe」容器 – Max 2015-04-01 04:52:04