0

有没有办法将 Scribd 与 Fancybox 一起使用来打开 iframe 而不是打开单独的窗口?

4

1 回答 1

0

是的,有:将您的fancybox附加到触发器,加载fancybox并onComplete初始化Scribd

 $('element').click(function () {

    $.fancybox({

        href: 'remote/page/here',
        onComplete: init_viewer

    });

function init_viewer() {

     doc_path = www.domain.com/yourdocument.pdf

    //alert(finalurl);
    var scribd_doc = scribd.Document.getDocFromUrl(doc_path, 'pub-YOURAPIKEY');

    var oniPaperReady = function (e) {
        // scribd_doc.api.setPage(3);
    }

    scribd_doc.addParam('jsapi_version', 1);
    scribd_doc.addParam('height', 600);
    scribd_doc.addParam('width', 800);
    scribd_doc.addParam('public', false);
    scribd_doc.addParam('disable_related_docs', true);

    scribd_doc.addEventListener('iPaperReady', oniPaperReady);
    scribd_doc.write('embedded_flash');


}
于 2011-03-24T19:02:48.137 回答