1/*! 2 * liScroll 1.0 3 * Examples and documentation at: 4 * http://www.gcmingati.net/wordpress/wp-content/lab/jquery/newsticker/jq-liscroll/scrollanimate.html 5 * 2007-2010 Gian Carlo Mingati 6 * Version: 1.0.2.1 (22-APRIL-2011) 7 * Dual licensed under the MIT and GPL licenses: 8 * http://www.opensource.org/licenses/mit-license.php 9 * http://www.gnu.org/licenses/gpl.html 10 * Requires: 11 * jQuery v1.2.x or later 12 * 13 */ 14 15 16jQuery.fn.liScroll = function(settings) { 17 settings = jQuery.extend({ 18 travelocity: 0.07 19 }, settings); 20 return this.each(function(){ 21 var $strip = jQuery(this); 22 $strip.addClass("newsticker") 23 var stripWidth = 1; 24 $strip.find("li").each(function(i){ 25 stripWidth += jQuery(this, i).outerWidth(true); // thanks to Michael Haszprunar and Fabien Volpi 26 }); 27 var $mask = $strip.wrap("<div class='mask'></div>"); 28 var $tickercontainer = $strip.parent().wrap("<div class='tickercontainer'></div>"); 29 var containerWidth = $strip.parent().parent().width(); //a.k.a. 'mask' width 30 $strip.width(stripWidth); 31 var totalTravel = stripWidth+containerWidth; 32 var defTiming = totalTravel/settings.travelocity; // thanks to Scott Waye 33 function scrollnews(spazio, tempo){ 34 $strip.animate({left: '-='+ spazio}, tempo, "linear", function(){$strip.css("left", containerWidth); scrollnews(totalTravel, defTiming);}); 35 } 36 scrollnews(totalTravel, defTiming); 37 $strip.hover(function(){ 38 jQuery(this).stop(); 39 }, 40 function(){ 41 var offset = jQuery(this).offset(); 42 var residualSpace = offset.left + stripWidth; 43 var residualTime = residualSpace/settings.travelocity; 44 scrollnews(residualSpace, residualTime); 45 }); 46 }); 47};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.