Note that there are some explanatory texts on larger screens.

plurals
  1. POhow to automatically open Shadowbox on window/page load
    text
    copied!<p>Me using <a href="http://www.shadowbox-js.com/" rel="nofollow">Shadowbox</a> and its working fine. But I dont like to open it after clicking on image (href), need to open it automatocally on pageload.</p> <p>What can I change to do it?</p> <p>Here is <strong>HTML</strong></p> <pre><code> &lt;div id="images"&gt; &lt;a href="resources/certified_training/1.png" rel="shadowbox[certifiedtraining];width=510;height=372"&gt;Image -1&lt;/a&gt; &lt;a href="resources/certified_training/2.png" rel="shadowbox[certifiedtraining];width=510;height=372"&gt;Image -2&lt;/a&gt; &lt;a href="resources/certified_training/3.png" rel="shadowbox[certifiedtraining];width=510;height=372"&gt;Image -3&lt;/a&gt; &lt;a href="resources/certified_training/4.png" rel="shadowbox[certifiedtraining];width=510;height=372"&gt;Image -4&lt;/a&gt; &lt;a href="resources/certified_training/5.png" rel="shadowbox[certifiedtraining];width=510;height=372"&gt;Image -5&lt;/a&gt; &lt;/div&gt; </code></pre> <p>And here <strong>JavaScript</strong></p> <pre><code>window.onload = function () { loadShadowbox(); }; function loadShadowbox() { Shadowbox.init({ showOverlay: false }); window.Shadowbox.setDimensionsOld = window.Shadowbox.setDimensions; window.Shadowbox.setDimensions = function (height, width, maxHeight, maxWidth, topBottom, leftRight, padding, preserveAspect) { var S = window.Shadowbox; window.Shadowbox.setDimensionsOld(height, width, maxHeight, maxWidth, topBottom, leftRight, padding, preserveAspect); window.Shadowbox.dimensions.top = 340; window.Shadowbox.dimensions.left = 430; return window.Shadowbox.dimensions; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload