1$(function() { 2 var size = 1160; 3 var box = $('#img'); 4 var btn = $('#btn'); 5 var next = $('#btn .next'); 6 var prev = $('#btn .prev'); 7 var time = 10000; 8 var slideImg = $('#slideimg'); 9 var firstImg = $('#firstimg'); 10 var text = $('#text img'); 11 var count = 0; 12 var ie = navigator.userAgent.indexOf('MSIE 7') != -1 || navigator.userAgent.indexOf('MSIE 8') != -1 ? true : false; 13 14 if (ie == false) { 15 firstImg.hide().fadeIn(800, function(){ 16 setTimeout(function() { 17 firstImg.fadeOut(600); 18 }, 1700); 19 }); 20 setTimeout(function(){ 21 slideImg.fadeIn(600, function() { 22 text.eq(count).fadeIn(1500); 23 slideEvent(); 24 }); 25 }, 3100); 26 } 27 else { 28 firstImg.hide(); 29 slideImg.show(); 30 text.eq(count).show(); 31 slideEvent(); 32 } 33 34 function slideEvent() { 35 next.click(function() { 36 btn.hide(); 37 text.hide(); 38 box.animate({ 39 marginLeft : parseInt(box.css('margin-left')) - size + 'px' 40 }, 800, function() { 41 box.css('margin-left', -size + 'px') 42 $('img', box).first().appendTo(box); 43 btn.fadeIn(); 44 count = count == 5 ? 0 : count + 1; 45 if (ie == false) { 46 text.eq(count).fadeIn(1500); 47 } 48 else { 49 text.eq(count).show(); 50 } 51 }); 52 }); 53 54 prev.click(function() { 55 btn.hide(); 56 text.hide(); 57 box.css('margin-left', - size * 2 + 'px') 58 $('img', box).last().prependTo(box); 59 box.animate({ 60 marginLeft : parseInt(box.css('margin-left')) + size + 'px' 61 }, 800, function() { 62// box.css('margin-left', - size + 'px') 63// $('img', box).last().prependTo(box); 64 btn.fadeIn(); 65 count = count == 0 ? 5 : count - 1; 66 if (ie == false) { 67 text.eq(count).fadeIn(1500); 68 } 69 else { 70 text.eq(count).show(); 71 } 72 }); 73 }); 74 75 next.mouseup(function() { 76 clearInterval(timerID); 77 timerID = setInterval(function() { 78 next.click(); 79 }, time); 80 }); 81 prev.mouseup(function() { 82 clearInterval(timerID); 83 timerID = setInterval(function() { 84 next.click(); 85 }, time); 86 }); 87 timerID = setInterval(function() { 88 next.click(); 89 }, time); 90 } 91 92});
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.