<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Серый форум &mdash; JS: Слайдер срабатывает один раз]]></title>
		<link>http://forum.script-coding.com/viewtopic.php?id=10048</link>
		<atom:link href="http://forum.script-coding.com/extern.php?action=feed&amp;tid=10048&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «JS: Слайдер срабатывает один раз».]]></description>
		<lastBuildDate>Mon, 13 Oct 2014 07:39:52 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[JS: Слайдер срабатывает один раз]]></title>
			<link>http://forum.script-coding.com/viewtopic.php?pid=87299#p87299</link>
			<description><![CDATA[<p>Здравствуйте есть такой слайдер <a href="http://hostserg.irk0.ru/%20">http://hostserg.irk0.ru/ </a>сейчас работает только кнопка &quot;forward&quot;, я уже над ним долго мучаюсь почти доделал но срабатывает он только один раз не могу разобраться в чем дело вот весь его код</p><div class="codebox"><pre><code>
(function($) {
$.fn.scrollbox = function(config) {
  //default config
  defConfig = {
    step: 50,                // Distance of each single step (in pixels)
    speed: 32,              // Delay after each single step (in milliseconds)
    switchItems: 1,         // Items to switch after each scroll event
    direction: &#039;vertical&#039;,
    distance: &#039;auto&#039;,            
  };
  config = $.extend(defConfig, config);
  config.scrollOffset = config.direction === &#039;vertical&#039; ? &#039;scrollTop&#039; : &#039;scrollLeft&#039;;
  return this.each(function() {
    var container = $(this),
        containerUL,
        nextScrollId = null,
        forward,
        scrollForward,
    containerUL = container.children(&#039;ul:first-child&#039;);
    scrollForward = function() {
                containerUL.children(&#039;li:nth-child(1)&#039;).removeClass(&#039;leftSide&#039;);
                containerUL.children(&#039;li:nth-child(1)&#039;).addClass(&#039;rightSide  &#039;);
                containerUL.children(&#039;li:nth-child(2)&#039;).removeClass(&#039;scale90 leftSide&#039;);
                containerUL.children(&#039;li:nth-child(2)&#039;).addClass(&#039;scale80 leftSide&#039;);
                containerUL.children(&#039;li:nth-child(3)&#039;).removeClass(&#039;scale100&#039;);
                containerUL.children(&#039;li:nth-child(3)&#039;).addClass(&#039;scale90 leftSide&#039;);
                containerUL.children(&#039;li:nth-child(4)&#039;).removeClass(&#039;scale90 rightSide&#039;);
                containerUL.children(&#039;li:nth-child(4)&#039;).addClass(&#039;scale100&#039;);
                containerUL.children(&#039;li:nth-child(5)&#039;).removeClass(&#039;scale80 rightSide&#039;);
                containerUL.children(&#039;li:nth-child(5)&#039;).addClass(&#039;scale90 rightSide&#039;);
    };
    forward = function() {
      scrollingId = setInterval(scrollForward, config.speed);
    };
    // bind events for container
    container.bind(&#039;forward&#039;, function() { clearTimeout(nextScrollId); forward(); });
  });
};
}(jQuery));
</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (serrrgggeee)]]></author>
			<pubDate>Mon, 13 Oct 2014 07:39:52 +0000</pubDate>
			<guid>http://forum.script-coding.com/viewtopic.php?pid=87299#p87299</guid>
		</item>
	</channel>
</rss>
