Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Give your next and previous links ids</p> <pre><code>prev: &lt;a href="" id="prev" target="myframe"&gt;&lt;/a&gt; | next: &lt;a id="next" href="" target="myframe"&gt;&lt;/a&gt; </code></pre> <p>Then some basic script should wire this up</p> <pre><code>var currentIndex = 0; function next(){ if (currentIndex != Urls.length - 1) load(urls[++currentIndex].url); } function previous(){ if (currentIndex != 0) load(urls[--currentIndex].url); } function() load(url){ $("#myframe").attr("src", url); } $(function() { $("#prev").click(function() { previous(); }); $("#next").click(function() { next(); }); }); </code></pre> <p>To handle the explicit links, I'd use data attributes to store the url, and use the same load function:</p> <pre><code>&lt;ol id="list"&gt; &lt;li&gt;&lt;a href="#" data-url="www.ebay.com" &gt;ebay&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data-url="www.amazon.com" &gt;amazon&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data-url="..." &gt;msn&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data-url="..." &gt;yahoo&lt;/a&gt;&lt;/li&gt; &lt;li&gt;&lt;a href="#" data-url="..." &gt;wikipedia&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt; </code></pre> <p>Then inside that jQuery document load function, something like:</p> <pre><code>$("#list a").click(function() { load($(this).data("url")); }); </code></pre> <p>So the whole thing would look like:</p> <pre><code>$(function() { $("#prev").click(function() { previous(); }); $("#next").click(function() { next(); }); $("#list a").click(function() { load($(this).data("url")); }); }); </code></pre>
    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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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