转载一篇例子,学习使用;

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script
src="http://cdn.jquerytools.org/1.0.2/jquery.tools.min.js"></script>

<script src="http://static.flowplayer.org/js/jquery.mousewheel.js"
></script>
<link rel="stylesheet" type="text/css"
href="http://static.flowplayer.org/tools/css/scrollable-navig.css" />

<style><!--
div.scrollable {
position:relative;

overflow:hidden;
width: 646px;
height:300px;
}

#thumbs {

position:absolute;
width:20000em;
clear:both;
border:1px solid
#222;
}

a.prev, a.next {
margin-top:118px;
}

#thumbs
div {
float:left;
width:214px;
height:300px;
background:#333
url(/upload/20090906120115441.png) repeat-x 0 146px;
color:#fff;

border-left:1px solid #333;
cursor:pointer;
}

#thumbs
div.hover {
background-color:#444;
}

#thumbs div.active {

background-color:#066;
cursor:default;
}

#thumbs h3, #thumbs
p, #thumbs span {
margin:13px;
font-family:"bitstream vera sans";

font-size:13px;
color:#fff;
}

#thumbs h3 em {

font-style:normal;
color:yellow;
}

--></style><style>div.scrollable {
position:relative;

overflow:hidden;
width: 646px;
height:300px;
}

#thumbs {

position:absolute;
width:20000em;
clear:both;
border:1px solid
#222;
}

a.prev, a.next {
margin-top:118px;
}

#thumbs
div {
float:left;
width:214px;
height:300px;
background:#333
url(/upload/20090906120115441.png) repeat-x 0 146px;
color:#fff;

border-left:1px solid #333;
cursor:pointer;
}

#thumbs
div.hover {
background-color:#444;
}

#thumbs div.active {

background-color:#066;
cursor:default;
}

#thumbs h3, #thumbs
p, #thumbs span {
margin:13px;
font-family:"bitstream vera sans";

font-size:13px;
color:#fff;
}

#thumbs h3 em {

font-style:normal;
color:yellow;
}</style>

<!-- navigator -->
<div
class="navi"></div>

<!-- prev link -->
<a
class="prev"></a>

<!-- root element for scrollable -->

<div class="scrollable">

<div id="thumbs">

<div>

<img src="/upload/20090906120116994.jpg"
/>

<h3><em>1. </em>An example title</h3>

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Proin et felis eget
tellus pharetra porttitor. Praesent dui arcu, egestas
quis, adipiscing a.
</p>

<span class="blue">60
sec</span>

</div>

<div>

<img
src="/upload/20090906120117587.jpg" />

<h3><em>2.
</em>An example title</h3>

<p>
Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Proin et felis eget
tellus pharetra
porttitor. Praesent dui arcu, egestas quis, adipiscing a.
</p>

<span class="blue">80 sec</span>

</div>

<div>

<img src="/upload/20090906120117884.jpg" />

<h3><em>3. </em>An example title</h3>

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Proin et felis eget
tellus pharetra porttitor. Praesent dui arcu, egestas
quis, adipiscing a.
</p>

<span class="blue">100
sec</span>

</div>

<div>

<img
src="/upload/20090906120117490.jpg" />

<h3><em>4.
</em>An example title</h3>

<p>
Lorem ipsum dolor
sit amet, consectetur adipiscing elit. Proin et felis eget
tellus pharetra
porttitor. Praesent dui arcu, egestas quis, adipiscing a.
</p>

<span class="blue">120 sec</span>

</div>

<div>

<img src="/upload/20090906120118968.jpg" />

<h3><em>5. </em>An example title</h3>

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Proin et felis eget
tellus pharetra porttitor. Praesent dui arcu, egestas
quis, adipiscing a.
</p>

<span class="blue">140
sec</span>

</div>

</div>

</div>

<!-- next link -->
<a class="next"></a>

<!-- let rest of the page float normally -->
<br
clear="all" />
<div>
<input type="button" value="remove"
id="remove"/>
</div>
<script
type="text/javascript"><!--
$(function() {

$("div.scrollable").scrollable({
size: 3,
vertical:false,

//clickable:false,
loop:true,//设置是否自动跳转(根据间隔时间)
//interval:
1000,//设置间歇时间间隔
//speed:2000,
items: '#thumbs',

//prev:'.prev',//跳转到上一项
//next:'.next'//跳转到下一项

prevPage:'.prev',//跳转到上一页
nextPage:'.next',//跳转到下一页
hoverClass:
'hover',
easing:'linear'
});

var
scrollable=$("div.scrollable").scrollable();

//alert(scrollable.getConf().prev);//获取配置对象中的prev属性

scrollable.getConf().speed=200;//设置配置对象的speed属性

//alert(scrollable.getIndex());//获取当前滚动项的索引

//alert(scrollable.getItems().length);//获取当前滚动项的数量

//alert(scrollable.getItemWrap().html());//获取包含滚动项的节点(class=scrollable),并将所有滚动项显示出来

//alert(scrollable.getPageAmount());//获取当前滚动栏分页数

//alert(scrollable.getPageIndex());//获取当前所在分页

//alert(scrollable.getRoot().html());//获取滚动项的上一级节点(id=thumbs)

//alert(scrollable.getSize());

//alert(scrollable.getVisibleItems().length);//获取当前可见滚动项数量

scrollable.next();//如果有下一个滚动项,则跳转到下一个滚动项

scrollable.prev(3000,function(){return true});//跳转到前一滚动项
//var seekTo=
scrollable.click(0).seekTo(2,1000,function(){
//alert(this.getIndex());

//});

//scrollable.move(2);
//scrollable.prevPage();//跳转到前一页

//scrollable.nextPage();//跳转到下一页
//scrollable.setPage(1);//跳转到下一页

//scrollable.begin();//跳转到第一个滚动项
//scrollable.end();//跳转到最后一个滚动项

scrollable.click(3);//使第四个滚动项处于选中状态

scrollable.onBeforeSeek(function(){
alert("you click the
"+this.getIndex()+"st scrollable item!");
});

$("#remove").click(function(){

scrollable.getItems().filter(":last").remove();//删除最后一个滚动项

scrollable.reload().prev();//自动更新相关配置信息,并跳转到被删除滚动项的前一项
});

});

// --></script>

http://blog.csdn.net/tinico/article/details/18033493

http://www.tuicool.com/articles/3QVnee

http://www.17sucai.com/pins/6509.html

原文链接:

http://www.poluoluo.com/jzxy/201110/143879.html?jdfwkey=zqwzi

http://www.poluoluo.com/jzxy/201110/143880.html?jdfwkey=fqfy21

jQueryTools-Scrollable.js的更多相关文章

  1. 基于MVC4+EasyUI的Web开发框架经验总结(4)--使用图表控件Highcharts

    在我们做各种应用的时候,我们可能都会使用到图表统计,以前接触过一些不同的图表控件,在无意中发现了图表控件Highcharts,其强大的功能和丰富的互动效果,令人难以忘怀.本篇主要介绍在Web开发中使用 ...

  2. 基于MVC4+EasyUI的Web开发框架形成之旅--界面控件的使用

    在前面介绍了两篇关于我的基于MVC4+EasyUI技术的Web开发框架的随笔,本篇继续介绍其中界面部分的一些使用知识,包括控件的赋值.取值.清空,以及相关的使用. 我们知道,一般Web界面包括的界面控 ...

  3. 转--基于MVC4+EasyUI的Web开发框架形成之旅--界面控件的使用

    原文  http://www.cnblogs.com/wuhuacong/p/3317223.html 基于MVC4+EasyUI的Web开发框架形成之旅--界面控件的使用 在前面介绍了两篇关于我的基 ...

  4. 毕业设计 ASP.Net+EasyUI开发 X X露天矿调度管理信息系统(一)

    开篇介绍关于EasyUI技术,界面部分的一些使用知识,包括控件的赋值.取值.清空,以及相关的使用. 我们知道,一般Web界面包括的界面控件有:单行文本框.多行文本框.密码文本框.下拉列表Combobo ...

  5. (转)基于MVC4+EasyUI的Web开发框架形成之旅--界面控件的使用

    原文地址:http://www.cnblogs.com/wuhuacong/p/3317223.html 在前面介绍了两篇关于我的基于MVC4+EasyUI技术的Web开发框架的随笔,本篇继续介绍其中 ...

  6. (转)基于MVC4+EasyUI的Web开发框架经验总结(4)--使用图表控件Highcharts

    http://www.cnblogs.com/wuhuacong/p/3736564.html 在我们做各种应用的时候,我们可能都会使用到图表统计,以前接触过一些不同的图表控件,在无意中发现了图表控件 ...

  7. Swiper.js 中文API手册

    本文分享自 http://www.cnblogs.com/scavengers/p/3760449.html ---------------------------华丽的分割线------------ ...

  8. prototype.js源码

    prototype 1.3.1 版本和之前的 1.2.0 版本有了不少改进,并增加了新的功能: 1. 增加了事件注册管理2. 增加了空间定位的常用函数3. 改善了 xmlhttp 的封装4. 移除了 ...

  9. Web打印使用printThis.js

    <script src="~/Content/JQueryTools/printThis/printThis.js"></script>

随机推荐

  1. IDLE in Python (Ubuntu)

    To lauch IDLE in the Current Woking Directory >>> usr/bin/idle3 Alt + n  # next command Alt ...

  2. 2.5.5 基本的 I/0 重定向

        标准输入/输出(standard I/O)可能是软件设计原则里最重要的概念了.这个概念就是:程序应该有数据的来源端.数据的目的端以及报告问题的地方,它们分别被称为标准输入(standard i ...

  3. JAVA内存模型与线程以及volatile理解

    Java内存模型是围绕在并发过程中如何处理原子性.可见性.有序性来建立的. 一.主内存与工作内存 Java内存模型主要目标是在虚拟机中将变量存储到内存和从内存中取出变量.这里的变量包括:实例字段.静态 ...

  4. mysql MVCC原理理解

    MVCC多版本控制: 指的是一种提高并发的技术.最早的数据库系统,只有读读之间可以并发,读写,写读,写写都要阻塞.引入多版本之后,只有写写之间相互阻塞,其他三种操作都可以并行,这样大幅度提高了Inno ...

  5. yum 源本地化 (two)

    之前写过一个yum源本地化的文章. 后来发现那个方法有些缺陷, yum install --downloadonly --downloaddir=/tmp/atomicdownload memcach ...

  6. maven更改镜像路径为阿里镜像,以便下载速度快

    1.maven更改镜像路径为阿里镜像,以便下载速度快 2.maven每更新一次镜像地址,都会重新下载一次包 3. 怎么配maven链接阿里云的镜像详细步骤 修改maven根目录下的conf文件夹中的s ...

  7. Git flow的分支模型与及经常使用命令简单介绍

    Git flow是git的一个扩展集,它基于Vincent Driessen 的分支模型,文章"A successful Git branching model"对这一分支模型进行 ...

  8. Xcode9自带版本控制系统(Git)的使用

    情形一:新项目工程 前提是首先你得有个Github账号. 1.创建新工程,选中使用git,创建本地仓库. 2.在偏好设置添加git账号. 3.创建Github远程仓库,xcode会自动帮你在Githu ...

  9. 一个MySQL-JDBC驱动bug引起的血案……

    问题背景 公司是做电商系统的,整个系统搭建在华为云上.系统设计的时候,考虑到后续的用户和订单数量比较大,需要使用一些大数据库的组件.关系型数据库这块,考虑到后续数据量的快速增长,不是直接写入MySQL ...

  10. 应用程序无法正常启动 0xc0000013 vs2013

    今天下午切换到Windows 优化代码,在debug 的时候一直出现这个问题,折腾了很久,发现原来是系统环境变量的问题,我之前装了双系统,讲原来win7 下的一块E盘删掉做了Linux 盘,而系统环境 ...