1$(document).ready(function () { 2 3 $("#show_socc_content").DuZhanBanner_Design({ showclass: "#show_socc_content",show_leg:"3" }); 4}); 5(function ($) { 6 $.fn.DuZhanBanner_Design = function (options) { 7 8 var defaults = { 9 showclass: "showBanner", 10 showspanindex: "", 11 show_leg: "5" 12 13 }; 14 var showindex = 0; 15 var options = $.extend(defaults, options); 16 var showlist = $(options.showclass + " ul li"); 17 var showfirst = showlist.eq(0); 18 var sWidth = showfirst.outerWidth(true)*options.show_leg; 19 var len = parseInt(showlist.length%options.show_leg>0?showlist.length/options.show_leg+1:showlist.length/options.show_leg); 20 var index = 0; 21 var showcur = "cur"; 22 var shownowclass = options.showclass; 23 24 if(len>1){ 25 $(".show_left").addClass("cur"); 26 } 27 28 29 $(".show_right").live("click",function(){ 30 if (index > 0) { 31 index--; 32 showMove(); 33 34 } 35 }); 36 37 $(".show_left").live("click",function(){ 38 if(index<len-1){ 39 index++; 40 showMove(); 41 } 42 }); 43 44 function showMove() { 45 if(index>0){ 46 $(".show_right").addClass("cur"); 47 48 }else{ 49 $(".show_right").removeClass("cur"); 50 } 51 if(index==len-1){ 52 53 $(".show_left").removeClass("cur"); 54 55 }else{ 56 57 $(".show_left").addClass("cur"); 58 59 } 60 if(index<len){ 61 var nowLeft = -index * sWidth; 62 $(options.showclass + " ul").stop(true, false).animate({ "left": nowLeft }, 500, function () { 63 }); 64 } else{ 65 66 index=len-1; 67 } 68 } 69 } 70})(jQuery)
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.