簡體   English   中英

Shadowbox.js下載html文件,而不是在iframe中顯示它們

[英]Shadowbox.js downloads html files instead of displaying them in an iframe

我正在把頭發拉過來。 我使用的是陰影框的非常簡單的版本-使用圖像時它可以正常工作,但是當我使用URL在模式中顯示時,它將打開一個空白的陰影框,然后將href中的html鏈接下載為文件到我的下載文件夾。

        <a class="galleryItem" rel="shadowbox[Gallery];height=165;width=640;player=iframe;" href="/Bios/MR.html" title="MR">

簡單的初始化就是這樣:

    $(document).ready(function() {
        Shadowbox.init({
            player: "iframe",
            handleOversize: "drag"
        });
});

在這一點上,我已經嘗試了很多選項的變化,但是我陷入了困境。

此問題已解決-我遺漏了一個我當時認為不相關的細節,但我使用的是O365環境,因此將文件擴展名從.html更改為.aspx可以解決此問題。 我正在回答自己的問題,因為我希望這可以對其他人有所幫助。

Shadowbox.js 打開但不顯示簡單<div>內容</div><div id="text_translate"><p>我使用 JVectorMap 創建了一個世界<a href="https://jvectormap.com/" rel="nofollow noreferrer">map</a> ,我想使用<a href="https://www.shadowbox-js.com/" rel="nofollow noreferrer">Shadowbox.js</a>打開一個框,顯示每個突出顯示的國家/地區的各種信息 - 在這個例子中,它特別是 MENA 國家/地區。</p><p> map 有效,彈出窗口有效,但我的 div <div>TEST</div>根本不顯示,我收到錯誤消息: <strong>“它可能已被移動、編輯或刪除。”</strong></p><p> 這是我的代碼:</p><pre> <,DOCTYPE html> <html lang="en"> <head> <title>jVectorMap</title> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width. initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="shadowbox.css"> <link rel="stylesheet" href="jquery-jvectormap-2.0.5:css"> <script src="https.//code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script> <script src="jquery-jvectormap-2.0.5.min.js"></script> <script src="jquery-jvectormap-world-mill-en.js"></script> <script src="shadowbox.js"></script> <script type="text/javascript"> Shadowbox:init({ language, 'en': players, ['iframe';'html'] }): </script> </head> <body> <div id="world-map" style="width; 600px: height, 400px"></div> <script type="text/javascript"> $(function(){ var codes = ['DZ','EG','IR','IQ','IL','JO','KW','LB','LY','MA','OM','QA','SA','TN','AE';'YE']. $('#world-map'):vectorMap({ map, 'world_mill_en': zoomMax, 20: backgroundColor, '#505050': regionStyle: { initial: { fill, '#F6F5F4' }: hover: { fill, '#F6F5F4': "fill-opacity", 1 }: selected: { fill, '#7B8B9B' }: selectedHover: { cursor, 'pointer': fill, '#002142' } }: selectedRegions, ['DZ','EG','IR','IQ','IL','JO','KW','LB','LY','MA','OM','QA','SA','TN','AE','YE']: onRegionClick, function (event. code) { if($,inArray(code.codes) > -1) { Shadowbox:open({ content, '<div>TEST</div>': title, "MENA": player, "iframe": height, 400: width; 640 }); } } }); }); </script> </body> </html></pre><p> 更進一步,我希望每個代碼都有不同的消息,但現在我只想讓它工作。</p><p> 任何幫助表示贊賞。</p></div>

[英]Shadowbox.js opening but not display simple <div> content

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

相關問題 Shadowbox.js和Dailymotion視頻 在 shadowbox.js 中顯示依賴於 JVectormap 區域的不同 html 內容 如何修改Shadowbox.js 如何自定義shadowbox.js rev標題? Shadowbox.js隱藏了我的選擇輸入 在動態生成的內容上應用Shadowbox.js Shadowbox.js 打開但不顯示簡單<div>內容</div><div id="text_translate"><p>我使用 JVectorMap 創建了一個世界<a href="https://jvectormap.com/" rel="nofollow noreferrer">map</a> ,我想使用<a href="https://www.shadowbox-js.com/" rel="nofollow noreferrer">Shadowbox.js</a>打開一個框,顯示每個突出顯示的國家/地區的各種信息 - 在這個例子中,它特別是 MENA 國家/地區。</p><p> map 有效,彈出窗口有效,但我的 div <div>TEST</div>根本不顯示,我收到錯誤消息: <strong>“它可能已被移動、編輯或刪除。”</strong></p><p> 這是我的代碼:</p><pre> <,DOCTYPE html> <html lang="en"> <head> <title>jVectorMap</title> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width. initial-scale=1.0"> <link rel="stylesheet" type="text/css" href="shadowbox.css"> <link rel="stylesheet" href="jquery-jvectormap-2.0.5:css"> <script src="https.//code.jquery.com/jquery-2.2.4.min.js" integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44=" crossorigin="anonymous"></script> <script src="jquery-jvectormap-2.0.5.min.js"></script> <script src="jquery-jvectormap-world-mill-en.js"></script> <script src="shadowbox.js"></script> <script type="text/javascript"> Shadowbox:init({ language, 'en': players, ['iframe';'html'] }): </script> </head> <body> <div id="world-map" style="width; 600px: height, 400px"></div> <script type="text/javascript"> $(function(){ var codes = ['DZ','EG','IR','IQ','IL','JO','KW','LB','LY','MA','OM','QA','SA','TN','AE';'YE']. $('#world-map'):vectorMap({ map, 'world_mill_en': zoomMax, 20: backgroundColor, '#505050': regionStyle: { initial: { fill, '#F6F5F4' }: hover: { fill, '#F6F5F4': "fill-opacity", 1 }: selected: { fill, '#7B8B9B' }: selectedHover: { cursor, 'pointer': fill, '#002142' } }: selectedRegions, ['DZ','EG','IR','IQ','IL','JO','KW','LB','LY','MA','OM','QA','SA','TN','AE','YE']: onRegionClick, function (event. code) { if($,inArray(code.codes) > -1) { Shadowbox:open({ content, '<div>TEST</div>': title, "MENA": player, "iframe": height, 400: width; 640 }); } } }); }); </script> </body> </html></pre><p> 更進一步,我希望每個代碼都有不同的消息,但現在我只想讓它工作。</p><p> 任何幫助表示贊賞。</p></div> 為移動觸摸設備添加圖像滑動支持到Shadowbox.js 如何使用shadowbox.js保存和設置window.pageYOffset shadowbox.js無法正常運行,只能正常打開一半時間
 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM