Note that there are some explanatory texts on larger screens.

plurals
  1. POReturn Multiple li's as a "slide"
    primarykey
    data
    text
    <p>I'm putting together a quick little status board that shows active and upcoming github issues.</p> <p>I have them all pulled in and formatted as a simple list and found a nice jQuery plugin that cycles through each item as a sort of slideshow. However, it was requested that it show multiple issues at once to fill up the screen more.</p> <p>So on each slide swap it would display, say 5 LI items at once versus just 1. And then swap to show the next 5 and so on.</p> <p>HTML</p> <pre><code>... &lt;ul id="issue-list"&gt; &lt;li class="issue"&gt;&lt;/li&gt; ... &lt;li class="issue"&gt;&lt;/li&gt; &lt;/ul&gt; ... &lt;script type="text/javascript"&gt; $(function() { $('#issue-list').swapmyli({ swapTime: 900, // Speed of effect in animation transitionTime: 700, // Speed of Transition of ul (height transformation) time: 4000, // How long each slide will show timer: 1, // Show (1) /Hide (0) the timer. css: 0 // Apply plugin css on the list elements. }); }); &lt;/script&gt; </code></pre> <p>JS</p> <pre><code>(function(e) { e.fn.swapmyli = function(t) { function s() { var e = i.parent().find(".timer span"); e.animate({ width: "100%" }, r); var n = i.find("li:first").outerHeight(true); i.find("li:first").fadeOut(120); i.animate({ height: n }, t.transitionTime); i.find("li").hide(); e.animate({ width: "0%" }, 60); i.find("li:first").remove().appendTo(i).fadeIn(t.swapTime) } var n = { swapTime: 300, transitionTime: 900, time: 2e3, timer: 1, css: 1 }; var t = e.extend(n, t); var r = t.time - t.swapTime; var i = this; i.wrap('&lt;div class="swapmyli clearfix"&gt;&lt;/div&gt;'); i.after('&lt;div class="timer"&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;&lt;br class="clear" /&gt;'); e(window).load(function() { var e = i.find("li:first").outerHeight(true); i.height(e); i.find("li").hide(); s() }); if (t.timer == 0) { i.parent().find(".timer").hide() } if (t.css == 0) { i.parent().addClass("nocss") } setInterval(s, t.time) } })(jQuery) </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    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.
 

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