switchable 滑动slide演示
可以控制每次滑动个数
XML/HTML Code
- <div class="container">
- <div class="g_slide" id="slides">
- <div class="switch_main">
- <a class="item switch_item" href="#"><img data-src="https://unsplash.it/752/450?image=738" /></a>
- <a class="item switch_item" href="#"><img data-src="https://unsplash.it/752/450?image=733" /></a>
- <a class="item switch_item" href="#"><img data-src="https://unsplash.it/752/450?image=635" /></a>
- <a class="item switch_item" href="#"><img data-src="https://unsplash.it/752/450?image=335" /></a>
- <a class="item switch_item" href="#"><img data-src="https://unsplash.it/752/450?image=435" /></a>
- </div>
- </div>
- <br>
- <br>
- <div class="g_slide" id="slides1">
- <div class="switch_main">
- <a class="item switch_item" href="#"><img data-src="https://unsplash.it/752/450?image=238" /></a>
- <a class="item switch_item" href="#"><img data-src="https://unsplash.it/752/450?image=133" /></a>
- <a class="item switch_item" href="#"><img data-src="https://unsplash.it/752/450?image=330" /></a>
- <a class="item switch_item" href="#"><img data-src="https://unsplash.it/752/450?image=426" /></a>
- </div>
- </div>
- <br>
- <br>
- <div class="scroll" id="scroll_wrap">
- <div class="scroll_in switch_main">
- <a class="item" href="#"><img data-src="https://unsplash.it/250/117?image=111" /></a>
- <a class="item" href="#"><img data-src="https://unsplash.it/250/117?image=121" /></a>
- <a class="item" href="#"><img data-src="https://unsplash.it/250/117?image=211" /></a>
- <a class="item" href="#"><img data-src="https://unsplash.it/250/117?image=311" /></a>
- <a class="item" href="#"><img data-src="https://unsplash.it/250/117?image=411" /></a>
- </div>
- </div>
- $(function(){
- switchable({
- $element: $('#slides')
- ,interval: 2000
- ,animateSpeed: 500
- });
- switchable({
- $element: $('#slides1')
- ,interval: 2000
- ,effect: 'fade'
- });
- switchable({
- $element: $('#scroll_wrap')
- ,interval: 2000
- ,showNav: true
- //,effect: 'fade'
- ,type: 'imgScroll'
- ,imgScroll: {
- num: 1
- }
- });
- });
- </script>
原文地址:http://www.freejs.net/article_jquerytupiantexiao_488.html