Simple jQuery/CSS3 slider
=========================
A simple slider that does what a simple slider has to do: slide slides!
Installation
------------
Include jQuery, simpleSlider.js, touchSwipe.js (optional if you want touch support) and transit.js in your `head`. The slider will automatically change transit's `useTransitionEnd` property to `true`. You can disable this by setting `updateTransit: false` in your options.
```code
<script src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
<script type="text/javascript" src="transit.js"></script>
<script type="text/javascript" src="touchSwipe.js"></script>
<script type="text/javascript" src="simpleSlider.js"></script>
```
Add a div to your site containing the slides. The standard name for these divs are `.slider` and `.slide`, but these can be changed in the options object
```code
<div class='slider'>
<div class='slide'>
<div class='slidecontent'>
<h1>Solar Dolar Wolar Woot</h1>
<h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam posuere cursus euismod.Aenean ut tortor leoing elit. Etiam posuere cursus euismod.Aenean ut tortor leo.</h2>
</div>
</div>
<div class='slide' >
<div class='slidecontent'>
<h1>Solar Dolar Wolar Woot</h1>
<h2>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam posuere cursus euismod.Aenean ut tortor leo.</h2>
</div>
</div>
</div>
```
Create the slider
```code
$(document).ready(function(){
$(".slider").simpleSlider();
});
```
Custom options
--------------
You can also control the options of the simpleSlider. Just parse an object with the options into the simpleSlider().
```code
$(document).ready(function(){
// Default options
var options = {
slides: '.slide', // The name of a slide in the slidesContainer
swipe: true, // Add possibility to Swipe > note that you have to include touchSwipe for this
slideTracker: true, // Add a UL with list items to track the current slide
slideTrackerID: 'slideposition', // The name of the UL that tracks the slides
slideOnInterval: true, // Slide on interval
interval: 5000, // Interval to slide on if slideOnInterval is enabled
animateDuration: 1500, // Duration of an animation
animationEasing: 'easeInOut', // Accepts: linear ease in out in-out snap easeOutCubic easeInOutCubic easeInCirc easeOutCirc easeInOutCirc easeInExpo easeOutExpo easeInOutExpo easeInQuad easeOutQuad easeInOutQuad easeInQuart easeOutQuart easeInOutQuart easeInQuint easeOutQuint easeInOutQuint easeInSine easeOutSine easeInOutSine easeInBack easeOutBack easeInOutBack
pauseOnHover: false // Pause when user hovers the slide container
};
$(".slider").simpleSlider(options);
});
```
Control the slider
--------------
You have to get the data from the dom element if you want to control the slider. The following code shows you how to do that
```code
$(document).ready(function(){
$(".slider").simpleSlider();
var slider = $(".slider").data("simpleslider");
slider.nextSlide(); // Go to the next slide
slider.prevSlide(); // Go to the previous slide
slider.nextSlide(slidenumber); // Go to the given slide
});
```
If enabled the slider automatically creates a list with list-items that you can use to control the slider.
Events
------
SimpleSlider will trigger a `beforeSliding` and `afterSliding` event. You can bind on these using the following code:
```code
$(".slider").simpleSlider();
$(".slider").on("beforeSliding", function(event){
// Event.prevSlide: previous slide ID
// Event.newSlide: coming slide ID
});
$(".slider").on("afterSliding", function(event){
// Event.prevSlide: previous slide ID
// Event.newSlide: coming slide ID
});
```
The `afterSliding` is triggered after the animation completed.
Examples
--------
Simple-jQuery-Slider is used in the following websites. You can check them out if you want to see the slider in action!
[Demo site #1](http://simpleslider.bitlabsbeta.nl/)
Supported browser
-----------------
SimpleSlider has been tested in Chrome, Firefox, Safari and Internet Explorer 7+.
没有合适的资源?快使用搜索试试~ 我知道了~
网站模板-科技产品公司介绍响应式网页模板-适配移动端界面-HTML源码.zip
共166个文件
jpg:41个
js:32个
png:18个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 98 浏览量
2024-03-23
09:38:04
上传
评论
收藏 13.56MB ZIP 举报
温馨提示
打造企业级网站卓越数字体验,引领业务发展潮流! 响应式设计 — 采用最新响应式网页设计技术,确保网站在各种屏幕尺寸和设备上均提供无缝浏览体验,无论用户使用桌面电脑、平板还是智能手机。 现代化UI/UX — 遵循现代网页设计和用户体验原则,这份源码利用干净的布局、优化的交互和引人入胜的视觉效果,为用户提供前沿的网络互动。 高度模块化 — HTML结构清晰,CSS和JavaScript分离,便于开发者进行定制化开发和功能扩展,无需担心后期维护和更新问题。 SEO优化 — 内置SEO最佳实践,包括元标签管理、清晰的导航结构和语义化的HTML5元素,助力网站在搜索引擎中排名提升,增加自然流量。 作为专业的程序员,了解高效、稳定且具有良好扩展性的网站架构对业务至关重要。这份企业级网站HTML源码将为你提供稳固的技术基础,让你的网站项目快速上线,同时保持长期的可维护性和可扩展性。
资源推荐
资源详情
资源评论
收起资源包目录
网站模板-科技产品公司介绍响应式网页模板-适配移动端界面-HTML源码.zip (166个子文件)
bootstrap.css 118KB
bootstrap.min.css 98KB
font-awesome.min.css 20KB
style.css 17KB
bootstrap-theme.css 15KB
bootstrap-theme.min.css 13KB
normalize.css 9KB
main.css 8KB
style.css 4KB
demo.css 2KB
scrollnavi.css 1KB
animate-custom.css 1KB
._main.css 304B
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
.DS_Store 6KB
._.DS_Store 120B
._.DS_Store 120B
._.DS_Store 120B
._.DS_Store 120B
fontawesome-webfont.eot 71KB
glyphicons-halflings-regular.eot 20KB
ico_loading.gif 723B
._ico_loading.gif 315B
index.html 58KB
blog.html 10KB
index.html 7KB
index.html 5KB
404.html 4KB
index.html 2KB
test.html 2KB
ScrollNavi.html 1KB
._index.html 407B
favicon.ico 766B
bg4.jpg 645KB
bg4.jpg 645KB
bg4.jpg 645KB
bg5.jpg 483KB
bg5.jpg 483KB
bg5.jpg 483KB
bcg_slide-1.jpg 473KB
bcg_slide-2.jpg 453KB
bcg_slide-3.jpg 361KB
bcg_slide-3.jpg 361KB
bcg_slide-4.jpg 341KB
bg1.jpg 265KB
bg1.jpg 265KB
bg1.jpg 265KB
bg3.jpg 260KB
bg3.jpg 260KB
bg3.jpg 260KB
preview.jpg 248KB
3.jpg 219KB
bg6.jpg 217KB
bg6.jpg 217KB
bg6.jpg 217KB
bg.jpg 206KB
bg2.jpg 135KB
bg2.jpg 135KB
bg2.jpg 135KB
img3.jpg 100KB
c-1.jpg 79KB
img5.jpg 68KB
c-3.jpg 66KB
c-2.jpg 61KB
img8.jpg 50KB
img7.jpg 49KB
img6.jpg 44KB
img4.jpg 44KB
img2.jpg 35KB
img1.jpg 32KB
._bcg_slide-1.jpg 317B
._bcg_slide-2.jpg 317B
._bcg_slide-4.jpg 316B
._bcg_slide-3.jpg 315B
less.js 94KB
jquery.min.js 94KB
jquery.min.js 92KB
jquery-1.9.1.min.js 90KB
jquery.min.js 90KB
bootstrap.js 54KB
skrollr.js 44KB
isotop.js 42KB
bootstrap.min.js 28KB
jquery.colorbox.js 28KB
imagesloaded.js 25KB
modernizr-2.7.1.min.js 15KB
touchSwipe.js 11KB
simpleSlider.js 10KB
transit.js 7KB
jquery.easing.min.js 5KB
jquery.easing.min.js 5KB
jquery.smint.js 5KB
jquery.smint.js 5KB
jquery.easy-ticker.js 4KB
jquery.easy-ticker.js 4KB
backstretch.js 4KB
jquery.easy-ticker.min.js 3KB
custom.js 2KB
共 166 条
- 1
- 2
资源评论
DTcode7
- 粉丝: 7121
- 资源: 4499
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功