Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Pages that open links simultaneously (including image previews) may use the <code>target</code> HTML attribute in combination with javascript <code>onclick</code>. First, the href:</p> <p>Take the following html:</p> <pre><code>&lt;a href="http://www.idontknow.com/some_image.png"&gt; &lt;img src="http://www.idontknow.com/some_image.png" /&gt; &lt;/a&gt; </code></pre> <p>...clicking this image will load the image in the same window. Now, consider:</p> <pre><code>&lt;a target="_blank" href="http://www.idontknow.com/some_image.png"&gt; &lt;img src="http://www.idontknow.com/some_image.png" /&gt; &lt;/a&gt; </code></pre> <p>...clicking this image will open the image (or link) in a new tab or window (depends on the user settings and browser capability).</p> <p>The javascript to accomplish the simultaneous popups:</p> <pre><code>&lt;a onclick="window.open('http://www.idontknow.com/some_image.png')" href="http://www.idontknow.com/some_other_page.html"&gt; &lt;img src="http://www.idontknow.com/some_image.png" /&gt; &lt;/a&gt; </code></pre> <p>Clicking THAT will direct the current page to <code>some_other_page.html</code> AND open the image (or whatever) in a popup.</p> <p><strong>Documentation</strong></p> <ul> <li><code>a</code> element on MDN - <a href="https://developer.mozilla.org/en-US/docs/HTML/Element/a" rel="nofollow">https://developer.mozilla.org/en-US/docs/HTML/Element/a</a></li> <li><code>window.open</code> on MDN - <a href="https://developer.mozilla.org/en-US/docs/DOM/window.open" rel="nofollow">https://developer.mozilla.org/en-US/docs/DOM/window.open</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

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