1(function($) { 2 3 function init() { 4 var pict = $('div.top_slidepict'); 5 6 if ( pict.length > 0 ) { 7 new PictSlider(pict); 8 } 9 } 10 11 function PictSlider(pict) { 12 13 this.target = pict.find('table'); 14 this.leftBtn = pict.find('p.slideleft a'); 15 this.rightBtn = pict.find('p.slideright a'); 16 17 // parameters 18 this.pictCount; 19 this.current; 20 this.currentPosition = 0; 21 this.slideRange = 453; 22 // startup 23 this.construct(); 24 } 25 26 PictSlider.prototype = { 27 construct : function() { 28 var that = this; 29 30 this.pictCount = this.target.find('td').length; 31 this.current = 0; 32 33 this.leftBtn.click(function() { 34 that.slidePict(false); 35 }); 36 this.rightBtn.click(function() { 37 that.slidePict(true); 38 }); 39 }, 40 slidePict : function(dir) { 41 //ã¹ã©ã¤ãã®æå¤§æ°ãåå¾ 42 var max_slider_num = document.getElementById('max_slider_num'); 43 if ( (! dir && this.current === 0) 44 || ( dir && this.current === Number(max_slider_num.value) )) { 45 return; 46 } 47 48 if ( dir ) { 49 this.target.animate({ 50 marginLeft : -((++this.current) * this.slideRange) + 'px' 51 }, 500); 52 } else { 53 this.target.animate({ 54 marginLeft : -((--this.current) * this.slideRange) + 'px' 55 }, 500); 56 } 57 } 58 }; 59 60 $(document).ready(init); 61 62})(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.