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

推荐订阅源

B
Blog RSS Feed
J
Java Code Geeks
H
Help Net Security
Google DeepMind News
Google DeepMind News
博客园 - 司徒正美
Microsoft Security Blog
Microsoft Security Blog
宝玉的分享
宝玉的分享
Stack Overflow Blog
Stack Overflow Blog
D
DataBreaches.Net
The GitHub Blog
The GitHub Blog
S
SegmentFault 最新的问题
U
Unit 42
博客园 - 三生石上(FineUI控件)
Last Week in AI
Last Week in AI
M
MIT News - Artificial intelligence
WordPress大学
WordPress大学
小众软件
小众软件
博客园 - 叶小钗
D
Docker
量子位
P
Proofpoint News Feed
博客园_首页
T
Tailwind CSS Blog
F
Fortinet All Blogs

博客园 - 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