Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Here are an approaching using html and jquery that you can easy use in your app:</p> <p>HTMl (feel free to replace <code>&lt;a&gt;</code> with any tag that you want):</p> <pre><code>&lt;a href="" class="previous"&gt;Previous&lt;/a&gt; &lt;img src="1.jpg" class="display"/&gt; &lt;img src="2.jpg" class="hide"/&gt; &lt;img src="3.jpg" class="hide"/&gt; &lt;img src="4.jpg" class="hide"/&gt; &lt;a href="" class="next"&gt;Next&lt;/a&gt; </code></pre> <p>Jquery:</p> <pre><code>$(document).ready(function(){ $(.previous).click(function(){ var current = $(.display); //hide current img current.attr("class", "hide"); //get previous img var pre = current.pre(); if(pre !== null) { //display previous img if available pre.atrr("class", "display"); } else { //dipslay last img if previous not available current.parent().find("img:last").attr("class", "display"); } }); $(.next).click(function(){ var current = $(.display); //hide current img current.attr("class", "hide"); //get next img var next = current.next(); if(next !== null) { //display next img if available next.atrr("class", "display"); } else { //display first img if next not available current.parent().find("img:first").attr("class", "display"); } }) }); </code></pre> <p>CSS (you can change the <code>display: block</code> to <code>inline</code> or anything that suit your requirement):</p> <pre><code>img.display { display: block; } img.hide { display: none; } </code></pre> <p>I'm not a pro html, css, jquery so hope this somehow help you</p>
    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.
 

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