2012-07-29 83 views
0

當我在谷歌搜索這個我只是得到了很多wordpress插件的迴應,所以我在這裏問。Regular FancyBox 1.3.4 w/Wordpress - Link

我有一個wordpress.org博客。有一個鏈接,onclick,我想打開一個fancybox w /裏面的一些內容,實際上是一個spotify嵌入式播放列表w /頭。

我已經包含了所有的fancybox文件並初始化,沒有運氣。這裏是我的代碼:

初始化:

<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> 
<script type="text/javascript" src="<?php echo get_template_directory_uri();?>/fancybox/jquery.fancybox-1.3.4.pack.js"></script> 
<link rel="stylesheet" type="text/css" href="<?php echo get_template_directory_uri();?>/fancybox/jquery.fancybox-1.3.4.css" media="screen" /> 
    <script type="text/javascript"> 
        $(document).ready(function() { 
         $("a#playlist_pop").fancybox({ 
           'overlayShow' : false, 
           'transitionIn' : 'elastic', 
           'transitionOut' : 'elastic' 
         }); 
        }); 
        </script> 

,這裏是我的html:

<div class="spotify_header" style="padding-bottom: 10px;padding-top: 10PX;text-align: center">CHECK US OUT ON <a id="playlist_pop" href="#playlist_data"><span>SPOTIFY</span></a> 
         <div style="display:none"> 
          <div id="playlist_data"> 
           <div id="Spotiplay"> 
            <h3>Artists We Love</h3><br/> 
            <div id="playlist_pop_con"><iframe src="https://embed.spotify.com/?uri=spotify:user:yalefox:playlist:3NCBHSkbl0jLZtUnNWkdPh" width="312" height="392" frameborder="0" allowtransparency="true"></iframe></div> 
           </div> 
          </div> 
      </div></div> 

誰能幫助我?令人難以置信的東西,所以很容易可以在WordPress作出這樣的痛苦..

我在控制檯中此錯誤消息如何:遺漏的類型錯誤:對象的翻譯:有沒有一種方法「的fancybox」

這是否意味着它是沒有閱讀fancybox js文件?

+0

請安裝firebug文件狐狸,並粘貼一些錯誤日誌在這裏 – 2012-07-29 15:59:12

+0

到問題的網站的鏈接將非常有幫助 – JFK 2012-07-29 16:23:42

+0

錯誤日誌中沒有比我發佈的更適用於此的其他內容了。該網站沒有生效,所以我也不能發佈它。也許有更好的解決方案使用iframe?我會再試一次,但是這次我要把fancybox文件放到根目錄中,而不是放在他們自己的文件夾中。這對於我使用的carouFredSel應用程序來說非常有用,它具有相同的錯誤味精,但它是在一個iframe中。不知道這是否重要。我會以任何方式更新! – 2012-07-29 19:04:29

回答

0

非常感謝您的幫助。不知道它與我的客戶的博客配置有什麼關係,或者只是缺乏對常規Fancybox 1.3.2和wordpress.org的支持,但我不得不求助於Lytebox wordpress插件 - http://wordpress.org/extend/plugins/lytebox/ - 您只需將rel = 「lyteframe」在一個標籤..我重新將它看起來就像一個fancybox,所以雖然不是最佳或像fancybox一樣健壯,但它不是一個壞的替代