• <output id="blrhh"></output>
      <output id="blrhh"><sup id="blrhh"><div id="blrhh"></div></sup></output>
      <tbody id="blrhh"><b id="blrhh"></b></tbody>

    1. <output id="blrhh"></output>
      <output id="blrhh"></output>

    2. <blockquote id="blrhh"><ruby id="blrhh"></ruby></blockquote>
      <big id="blrhh"></big>
            1. <var id="blrhh"></var>

            2. <big id="blrhh"></big>

                <blockquote id="blrhh"></blockquote><var id="blrhh"><delect id="blrhh"><source id="blrhh"></source></delect></var>

                    <span id="blrhh"></span>
                    <strike id="blrhh"></strike><span id="blrhh"><i id="blrhh"></i></span><del id="blrhh"><ins id="blrhh"><menuitem id="blrhh"></menuitem></ins></del><strike id="blrhh"><dl id="blrhh"><ruby id="blrhh"></ruby></dl></strike>
                    <strike id="blrhh"></strike>
                    <th id="blrhh"><video id="blrhh"></video></th>

                    非常漂亮的一款jQuery横向带箭头左右滚动效果

                    非常漂亮的一款jQuery横向带箭头左右滚动效果
                     点击预览  点击下载

                    本款JQuery左右滚动代码很漂亮,带左右箭头,点击箭头可以向左或者向右滚动一屏,一屏4张图片。当然,有能力的话你可以修改数量。

                    html代码:

                    1. <div class="box" style="margin-top:50px;"> 
                    2.     <div class="picbox"> 
                    3.         <ul class="piclist mainlist"> 
                    4.             <li><a href="#" target="_blank"><img src="images/1.jpg" width="220" height="105" /></a></li> 
                    5.             <li><a href="#" target="_blank"><img src="images/2.jpg" /></a></li> 
                    6.             <li><a href="#" target="_blank"><img src="images/3.jpg" /></a></li> 
                    7.             <li><a href="#" target="_blank"><img src="images/4.jpg" /></a></li> 
                    8.             <li><a href="#" target="_blank"><img src="images/1.jpg" /></a></li> 
                    9.             <li><a href="#" target="_blank"><img src="images/2.jpg" /></a></li> 
                    10.             <li><a href="#" target="_blank"><img src="images/3.jpg" /></a></li> 
                    11.             <li><a href="#" target="_blank"><img src="images/4.jpg" /></a></li> 
                    12.         </ul> 
                    13.         <ul class="piclist swaplist"></ul> 
                    14.     </div> 
                    15.     <div class="og_prev"></div> 
                    16.     <div class="og_next"></div> 
                    17. </div> 

                    JQuery代码:

                    1. $(document).ready(function(e) { 
                    2.     /***不需要自动滚动,去掉即可***/ 
                    3.     time = window.setInterval(function(){ 
                    4.         $('.og_next').click();   
                    5.     },5000); 
                    6.     /***不需要自动滚动,去掉即可***/ 
                    7.     linum = $('.mainlist li').length;//图片数量 
                    8.     w = linum * 250;//ul宽度 
                    9.     $('.piclist').css('width', w + 'px');//ul宽度 
                    10.     $('.swaplist').html($('.mainlist').html());//复制内容 
                    11.      
                    12.     $('.og_next').click(function(){ 
                    13.          
                    14.         if($('.swaplist,.mainlist').is(':animated')){ 
                    15.             $('.swaplist,.mainlist').stop(true,true); 
                    16.         } 
                    17.          
                    18.         if($('.mainlist li').length>4){//多于4张图片 
                    19.             ml = parseInt($('.mainlist').css('left'));//默认图片ul位置 
                    20.             sl = parseInt($('.swaplist').css('left'));//交换图片ul位置 
                    21.             if(ml<=0 && ml>w*-1){//默认图片显示时 
                    22.                 $('.swaplist').css({left: '1000px'});//交换图片放在显示区域右侧 
                    23.                 $('.mainlist').animate({left: ml - 1000 + 'px'},'slow');//默认图片滚动                 
                    24.                 if(ml==(w-1000)*-1){//默认图片最后一屏时 
                    25.                     $('.swaplist').animate({left: '0px'},'slow');//交换图片滚动 
                    26.                 } 
                    27.             }else{//交换图片显示时 
                    28.                 $('.mainlist').css({left: '1000px'})//默认图片放在显示区域右 
                    29.                 $('.swaplist').animate({left: sl - 1000 + 'px'},'slow');//交换图片滚动 
                    30.                 if(sl==(w-1000)*-1){//交换图片最后一屏时 
                    31.                     $('.mainlist').animate({left: '0px'},'slow');//默认图片滚动 
                    32.                 } 
                    33.             } 
                    34.         } 
                    35.     }) 
                    36.     $('.og_prev').click(function(){ 
                    37.          
                    38.         if($('.swaplist,.mainlist').is(':animated')){ 
                    39.             $('.swaplist,.mainlist').stop(true,true); 
                    40.         } 
                    41.          
                    42.         if($('.mainlist li').length>4){ 
                    43.             ml = parseInt($('.mainlist').css('left')); 
                    44.             sl = parseInt($('.swaplist').css('left')); 
                    45.             if(ml<=0 && ml>w*-1){ 
                    46.                 $('.swaplist').css({left: w * -1 + 'px'}); 
                    47.                 $('.mainlist').animate({left: ml + 1000 + 'px'},'slow');                 
                    48.                 if(ml==0){ 
                    49.                     $('.swaplist').animate({left: (w - 1000) * -1 + 'px'},'slow'); 
                    50.                 } 
                    51.             }else
                    52.                 $('.mainlist').css({left: (w - 1000) * -1 + 'px'}); 
                    53.                 $('.swaplist').animate({left: sl + 1000 + 'px'},'slow'); 
                    54.                 if(sl==0){ 
                    55.                     $('.mainlist').animate({left: '0px'},'slow'); 
                    56.                 } 
                    57.             } 
                    58.         } 
                    59.     })     
                    60. }); 
                    61.  
                    62. $(document).ready(function(){ 
                    63.     $('.og_prev,.og_next').hover(function(){ 
                    64.             $(this).fadeTo('fast',1); 
                    65.         },function(){ 
                    66.             $(this).fadeTo('fast',0.7); 
                    67.     }) 
                    68.  
                    69. }) 

                    转载请注明:代码家园 ? 非常漂亮的一款jQuery横向带箭头左右滚动效果

                    评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证?#28783;?#25551;述)
                  1. <output id="blrhh"></output>
                      <output id="blrhh"><sup id="blrhh"><div id="blrhh"></div></sup></output>
                      <tbody id="blrhh"><b id="blrhh"></b></tbody>

                    1. <output id="blrhh"></output>
                      <output id="blrhh"></output>

                    2. <blockquote id="blrhh"><ruby id="blrhh"></ruby></blockquote>
                      <big id="blrhh"></big>
                            1. <var id="blrhh"></var>

                            2. <big id="blrhh"></big>

                                <blockquote id="blrhh"></blockquote><var id="blrhh"><delect id="blrhh"><source id="blrhh"></source></delect></var>

                                    <span id="blrhh"></span>
                                    <strike id="blrhh"></strike><span id="blrhh"><i id="blrhh"></i></span><del id="blrhh"><ins id="blrhh"><menuitem id="blrhh"></menuitem></ins></del><strike id="blrhh"><dl id="blrhh"><ruby id="blrhh"></ruby></dl></strike>
                                    <strike id="blrhh"></strike>
                                    <th id="blrhh"><video id="blrhh"></video></th>
                                    青海快3定位走势图
                                  1. <output id="blrhh"></output>
                                      <output id="blrhh"><sup id="blrhh"><div id="blrhh"></div></sup></output>
                                      <tbody id="blrhh"><b id="blrhh"></b></tbody>

                                    1. <output id="blrhh"></output>
                                      <output id="blrhh"></output>

                                    2. <blockquote id="blrhh"><ruby id="blrhh"></ruby></blockquote>
                                      <big id="blrhh"></big>
                                            1. <var id="blrhh"></var>

                                            2. <big id="blrhh"></big>

                                                <blockquote id="blrhh"></blockquote><var id="blrhh"><delect id="blrhh"><source id="blrhh"></source></delect></var>

                                                    <span id="blrhh"></span>
                                                    <strike id="blrhh"></strike><span id="blrhh"><i id="blrhh"></i></span><del id="blrhh"><ins id="blrhh"><menuitem id="blrhh"></menuitem></ins></del><strike id="blrhh"><dl id="blrhh"><ruby id="blrhh"></ruby></dl></strike>
                                                    <strike id="blrhh"></strike>
                                                    <th id="blrhh"><video id="blrhh"></video></th>
                                                  1. <output id="blrhh"></output>
                                                      <output id="blrhh"><sup id="blrhh"><div id="blrhh"></div></sup></output>
                                                      <tbody id="blrhh"><b id="blrhh"></b></tbody>

                                                    1. <output id="blrhh"></output>
                                                      <output id="blrhh"></output>

                                                    2. <blockquote id="blrhh"><ruby id="blrhh"></ruby></blockquote>
                                                      <big id="blrhh"></big>
                                                            1. <var id="blrhh"></var>

                                                            2. <big id="blrhh"></big>

                                                                <blockquote id="blrhh"></blockquote><var id="blrhh"><delect id="blrhh"><source id="blrhh"></source></delect></var>

                                                                    <span id="blrhh"></span>
                                                                    <strike id="blrhh"></strike><span id="blrhh"><i id="blrhh"></i></span><del id="blrhh"><ins id="blrhh"><menuitem id="blrhh"></menuitem></ins></del><strike id="blrhh"><dl id="blrhh"><ruby id="blrhh"></ruby></dl></strike>
                                                                    <strike id="blrhh"></strike>
                                                                    <th id="blrhh"><video id="blrhh"></video></th>