Note that there are some explanatory texts on larger screens.

plurals
  1. POjQuery Content Slider script help
    primarykey
    data
    text
    <p>I have on my site a <code>&lt;div&gt;</code> which contains child <code>&lt;div&gt;</code>'s. I want to make those children to slide into place like a content slider. I've tried a couple of different plugins, but they all failed because they tried to do some kind of DOM manipulation that just made things bad...</p> <p>My own implementation is poor and seems to be having major performance issues.</p> <p>So, I would like to know if anyone knows of a good content slider that isn't going to screw things up and one that hopefully has good documentation. Don't recommend bxSlider or easySlider, tried them and they failed, especially bxSlider.</p> <p>Here's how the elements are structured:</p> <pre><code>&lt;div class="Parent"&gt; &lt;div&gt; &lt;h2&gt;...&lt;/h2&gt; &lt;ul&gt; &lt;li&gt;...&lt;/li&gt; &lt;/ul&gt; &lt;p&gt;...&lt;/p&gt; &lt;/div&gt; (Repeat) &lt;/div&gt; </code></pre> <p>Thanks in advance!</p> <p><strong>EDIT</strong></p> <p>I've rebuilt my implementation and it's working almost the way I want it to. The problem is that when it reaches the end of the list, it will slide backwards through all items really quick and then start over. Not sure exactly how to fix it. Would appreciate any suggestions!</p> <pre><code>var interval; var Slider = function () { var width = $(".Parent").width(); var count = $(".Children").size(); var margin = width; var wrapper = $(".Wrapper"); var a = 0; wrapper.css({ width: (width * count) }); var interval = window.setInterval(function () { if (margin == (width * count)) { margin = 0; a = 0; } else { margin = (width * a); }; wrapper.animate({ marginLeft: ("-" + margin + "px") }, 1000); a++; }, 6000); }; </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. 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