我正在使用jquery.prettyPhoto在我的網站上顯示相冊。我激活了social_tools
以在每張照片下方顯示twitter和facebook小部件。所有圖片都有相同數量的臉書喜歡prettyPhoto
問題是,如果有人喜歡一張照片,所有其他照片都喜歡,所以每張照片有234個喜歡。
這是因爲我的location.href
在另一張圖片顯示時沒有改變?
代碼激活我的專輯是:
$.fn.prettyPhoto({
slideShow: 3000,
social_tools: ''
+'<div class="pp_social">'
+'<div class="twitter">'
+'<a href="http://twitter.com/share" class="twitter-share-button" data-count="none">Tweet</a>'
+'<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>'
+'</div>'
+'<div class="facebook">'
+'<iframe src="http://www.facebook.com/plugins/like.php?locale=nl_NL&href='+location.href+'&layout=button_count&show_faces=true&width=500&action=like&font&colorscheme=light&height=23" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:500px; height:23px;" allowTransparency="true"></iframe>'
+'</div>'
+'</div>'
});
我怎樣才能解決這個問題?
在此先感謝。
圖像'src'的圖像'id'是否有佔位符(或類似的東西)? – 2012-08-03 08:10:56