2
我想使用Fancybox加載PDF,我已經通過多個論壇找到答案,並嘗試了很多建議,但我似乎無法讓它在Firefox上工作我的Mac。我已經使用這個代碼:Mac上的Fancybox + Firefox
$(document).ready(function() {
$(".pdf").click(function() {
$.fancybox({
'width': 700, // or whatever
'height': 900,
'autoSize': false,
'content': '<embed src="'+this.href+'#nameddest=self&page=1&view=FitH,0&zoom=80,0,0" type="application/pdf" height="99%" width="100%" />',
});
return false;
}); // pdf
); // ready
與此鏈接一起:
<a class="pdf" href="sample.pdf"><img src="test.jpg" width="81" height="108" alt="testimg" /></a>
我用截屏測試頁可以在這裏看到:
http://shannawise.com/clients/fancy_box_test.html
我將不勝感激任何幫幫我!提前致謝!
SideNote:我得到了googledoc的建議,但不喜歡它呈現PDF的方式。
我很高興你的迴應!有用!我以爲我有最新版本,因爲我從GitHub鏈接下載它,但我猜不是。再次感謝你的幫助 :) – user2476146