Hello with jQuery liscroll code

Hello

The following scroller scrolls news from right to left. Can someone help and show me to how to change the code to the news scrolls from left to right.
Thank you

http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html

The JS code is here

jQuery.fn.liScroll = function(settings) {
		settings = jQuery.extend({
		travelocity: 0.07
		}, settings);		
		return this.each(function(){
				var $strip = jQuery(this);
				$strip.addClass("newsticker")
				var stripWidth = 0;
				var $mask = $strip.wrap("<div class='mask'></div>");
				var $tickercontainer = $strip.parent().wrap("<div class='tickercontainer'></div>");								
				var containerWidth = $strip.parent().parent().width();	//a.k.a. 'mask' width 	
				$strip.find("li").each(function(i){
				stripWidth += jQuery(this, i).width();
				});
				$strip.width(stripWidth);			
				var totalTravel = stripWidth+containerWidth;
				var defTiming = totalTravel/settings.travelocity;	// thanks to Scott Waye		
				function scrollnews(spazio, tempo){
				$strip.animate({left: '-='+ spazio}, tempo, "linear", function(){$strip.css("left", containerWidth); scrollnews(totalTravel, defTiming);});
				}
				scrollnews(totalTravel, defTiming);				
				$strip.hover(function(){
				jQuery(this).stop();
				},
				function(){
				var offset = jQuery(this).offset();
				var residualSpace = offset.left + stripWidth;
				var residualTime = residualSpace/settings.travelocity;
				scrollnews(residualSpace, residualTime);
				});			
		});	
};

Have you tried changing ‘-=’ to ‘+=’

Hello,

I changed -= to += but there are some side effects:

  1. Not all <li>'s appears, only the first two
  2. The scrolls goes for one time and never comes back again
  1. Start the strip at the negative stripWidth position.
  2. When the animation ends, reposition the strip at the negative stripWidth.

This section of code contains all of the changes.

The first change is changing ‘-=’ to ‘+=’
The next change is to change (“left”, containerWidth) to (“left”, -stripWidth)
The last change is to start the strip at the right place, by adding the same strip reset after the scrollnews function:
$strip.css(‘left’, -stripWidth);


function scrollnews(distance, tempo){
	$strip.animate({left: '+='+ distance}, tempo, "linear", function(){
        $strip.css("left", -stripWidth);
        scrollnews(totalTravel, defTiming);
    });
}
$strip.css('left', -stripWidth);
scrollnews(totalTravel, defTiming);				

Thank you.
Worked.