Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Try this <a href="http://jsfiddle.net/AxjND/" rel="nofollow">http://jsfiddle.net/AxjND/</a> It should work on resize too, but it restarts the slideshow on resize.</p> <p>here are the main changes</p> <pre><code>$(document).ready(function() { if ($(window).width() * .66625 &lt; $(window).height()) { $('#maximage').cycle({ fx: 'scrollHorz', speed: 1000, timeout: 7000, width: $('#maximage').width(), height: $('#maximage').width() * .66625, fit: 1, prev: '#arrow_left', next: '#arrow_right' }); } else { $('#maximage').cycle({ fx: 'scrollHorz', speed: 1000, timeout: 7000, width: $('#maximage').height() / .66625, height: $('#maximage').height(), fit: 1, prev: '#arrow_left', next: '#arrow_right' }); } if ($(window).width() &gt; $('#maximage').width()) { $('#maximage').css({'left': (($(window).width() - $('#maximage').width()) / 2) + 'px'}); } </code></pre> <p>and </p> <pre><code>function resizeBg() { $('#maximage').cycle('destroy'); if ($(window).width() * .66625 &lt; $(window).height()) { $('#maximage').cycle({ fx: 'scrollHorz', speed: 1000, timeout: 7000, width: $(window).width(), height: $(window).width() * .66625, fit: 1, prev: '#arrow_left', next: '#arrow_right' }); } else { $('#maximage').cycle({ fx: 'scrollHorz', speed: 1000, timeout: 7000, width: $(window).height() / .66625, height: $(window).height(), fit: 1, prev: '#arrow_left', next: '#arrow_right' }); } if ($(window).width() &gt; $('#maximage').width()) { $('#maximage').css({'left': (($(window).width() - $('#maximage').width()) / 2) + 'px'}); } } $(window).resize(function() { resizeBg(); }).trigger("resize"); </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