Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>My solution requires you to put one additional <code>div</code> inside your container and one css rule. It goes like this:</p> <pre><code>&lt;script type="text/javascript"&gt; $(document).ready(function(){ var top = 0; var up = true; var wrap = $(".rotate_container &gt; div ") // shortcut :) function slide() { wrap.animate( { "top" : top+"px" }, 400 ); if( Math.abs( top ) &gt; wrap.height() ){ // if all inner_wrap is outside container up = false; } else if( top &gt;= 0 ) { up = true } if( up ) top -= 165; else top += 165; setTimeout( slide, 500 ) // call function slide after 500 ms } setTimeout( slide, 500 ) // call function slide after 500 ms }); &lt;/script&gt; &lt;style type="text/css"&gt; .rotate_container { max-height:292px; max-width:760px; height:292px; width:760px; overflow:hidden; padding:0; margin:0;} .rotate_container &gt; div { position: relative; top: 0; left: 0; } .rotate_container img { height:292px; width:760px;} &lt;/style&gt; &lt;div class="rotate_container grid_12"&gt; &lt;div id="inner_wrap"&gt; &lt;img src="{{ MEDIA_URL }}/employlogo.png" class="top" /&gt; &lt;img src="{{ MEDIA_URL }}/employlogo.png" class="middle" /&gt; &lt;img src="{{ MEDIA_URL }}/employlogo.png" class="midbottom" /&gt; &lt;img src="{{ MEDIA_URL }}/employlogo.png" class="bottom" /&gt; &lt;img src="{{ MEDIA_URL }}/employlogo.png" class="verybottom" /&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <p>Well, it's not pretty, but it works. I misunderstood your snippet at first, sorry.</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. 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