我想將jsfiddle創建轉移到我的網站,但我無法這樣做。這裏是鏈接到它:無法將jsfiddle創建轉移到網站
http://jsfiddle.net/mDc7p/213/
/*
Eventbrite Examples - organizer event list
If you copy this code, please set your own API Key in the example below.
You can request one here: http://www.eventbrite.com/api/key
*/
Eventbrite({'app_key': "HSMTSI2CUDKAXFTXX2"}, function(eb){
// define a few parameters to pass to the API
// Options are listed here: http://developer.eventbrite.com/doc/organizers/organizer_list_events/
var options = {
'id' : "1667880002"
};
// provide a callback to display the response data:
eb.organizer_list_events(options, function(response){
$('.event_list').html(eb.utils.eventList(response, eb.utils.eventListRow));
});
});
我曾嘗試加入JavaScript代碼關閉我的header.php,footer.php和模板文件的底部(的一個<script type="text/javascript"></script>
標籤內我在那個特定的頁面上使用它,但它不工作。添加javascript代碼後,我在頁面內容區域添加<div class="event_list"></div>
,因爲這是我想要的代碼工作,但它不工作。我包括jquery庫在head.php文件裏面的'head'標籤,我也嘗試了onLoad方法,通過將代碼添加到javascript的頂部,但是,可惜的是,它沒有工作,請幫助我。
P.S我的網站正在運行Wordpress。
「它沒有工作」沒有幫助。控制檯中有錯誤嗎? – 2013-03-18 16:26:49
您是否添加了外部資源? – jcubic 2013-03-18 16:31:22