惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
月光博客
月光博客
博客园 - Franky
博客园 - 三生石上(FineUI控件)
爱范儿
爱范儿
博客园 - 司徒正美
博客园 - 叶小钗
Apple Machine Learning Research
Apple Machine Learning Research
美团技术团队
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
The Cloudflare Blog
B
Blog RSS Feed
阮一峰的网络日志
阮一峰的网络日志
宝玉的分享
宝玉的分享
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
IT之家
IT之家
博客园_首页
S
SegmentFault 最新的问题
A
About on SuperTechFans
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
H
Help Net Security
MongoDB | Blog
MongoDB | Blog

博客园 - sonkoto

HTML5添加的一些常用新标签 css判断ie浏览器 [jQuery] table表格 [jQuery] menu_Sliding(menu 滑动) [jQuery]animated-hover [jQuery]图片更换 [jQuery] simple-disappear (消失的例子)——【转】 [转]jQuery formValidator【表达校验插件】 table Editor[table排序] [jQuery] jQuery Plugins by Dylan Verheul [转]jQuery源码解读---执行过程分析 [JQuery Cycle Plugin] 图片轮换 [jQuery] 漂亮的menu+样式表切换 JQuery Cycle Plugin (jQuery循环插件_图片轮换) [转]JQuery效果展示--不看后悔N辈子 [转]DOV+CSS表单:超炫的单选框与复选框效果! [转]【★】javascript 常用代码 超经典! 【转】jQuery下拉框,单选框,多选框整理 Flash:百叶窗 效果
[jQuery]animate(滑块滑动)
sonkoto · 2008-07-20 · via 博客园 - sonkoto

Html:

<p><href="#" class="run">Run</a></p>
<div id="box">
</div>

css:

<style type="text/css">
body 
{
    margin
: 20px auto;
    padding
: 0;
    width
: 580px;
    font
: 80%/120% Arial, Helvetica, sans-serif;
}

{
    font-weight
: bold;
    color
: #000000;
}

#box 
{
    background
: #6699FF;
    height
: 100px;
    width
: 100px;
    position
: relative;
}

</style>

jQuery:

$(document).ready(function(){
    $(
".run").click(function(){
    
        $(
"#box").animate({opacity: "0.1", left: "+=400"}1200)
        .animate(
{opacity: "0.4", top: "+=160", height: "20", width: "20"}"slow")
        .animate(
{opacity: "1", left: "0", height: "100", width: "100"}"slow")
        .animate(
{top: "0"}"fast")
        .slideUp()
        .slideDown(
"slow")
        
return false;
    
    }
);
}
);

参考网址:http://www.bbon.cn/wp-content/uploads/demo/jquery/chainable-effects.html