jQuery 效果
来源:互联网 发布:mac用什么吉他声卡 编辑:程序博客网 时间:2024/06/07 03:48
slideDown:用滑动运动显示匹配的元素
<!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>slideDown demo</title> <style> div { background: #cfd; margin: 3px; width: 50px; text-align: center; float: left; cursor: pointer; border: 2px outset black; font-weight: bolder; } input { display: none; width: 120px; float: left; margin: 10px; } </style> <script src="https://code.jquery.com/jquery-1.10.2.js"></script></head><body><div>Push!</div><input type="text"><input type="text" class="middle"><input type="text"><script>$( "div" ).click(function() { $( this ).css({ borderStyle: "inset", cursor: "wait" }); $( "input" ).slideDown( 1000, function() { $( this ) .css( "border", "2px red inset" ) .filter( ".middle" ) .css( "background", "yellow" ) .focus(); $( "div" ).css( "visibility", "hidden" ); });});</script></body></html>
slideToggle:使用滑动运动显示或隐藏匹配的元素。
<!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>slideToggle demo</title> <style> div { background: #b977d1; margin: 3px; width: 60px; height: 60px; float: left; } div.still { background: #345; width: 5px; } div.hider { display: none; } span { color: red; } p { clear: left; } </style> <script src="https://code.jquery.com/jquery-1.10.2.js"></script></head><body><div></div><div class="still"></div><div style="display:none;"></div><div class="still"></div><div></div><div class="still"></div><div class="hider"></div><div class="still"></div><div class="hider"></div><div class="still"></div><div></div><p><button id="aa">Toggle</button> There have been <span>0</span> toggled divs.</p><script>$( "#aa" ).click(function() { $( "div:not(.still)" ).slideToggle( "slow", function() { var n = parseInt( $( "span" ).text(), 10 ); $( "span" ).text( n + 1 ); });});</script></body></html>
<!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>slideToggle demo</title> <style> p { width: 400px; } </style> <script src="https://code.jquery.com/jquery-1.10.2.js"></script></head><body><button>Toggle</button><p> This is the paragraph to end all paragraphs. You should feel <em>lucky</em> to have seen such a paragraph in your life. Congratulations!</p><script>$( "button" ).click(function() { $( "p" ).slideToggle( "slow" );});</script></body></html>
slideUp:用滑动运动隐藏匹配的元素。
<!doctype html><html lang="en"><head> <meta charset="utf-8"> <title>slideUp demo</title> <style> div { margin: 2px; } </style> <script src="https://code.jquery.com/jquery-1.10.2.js"></script></head><body><div> <button>Hide One</button> <input type="text" value="One"></div><div> <button>Hide Two</button> <input type="text" value="Two"></div><div> <button>Hide Three</button> <input type="text" value="Three"></div><div id="msg"></div><script>$( "button" ).click(function() { $( this ).parent().slideUp( "slow", function() { $( "#msg" ).text( $( "button", this ).text() + " has completed." ); });});</script></body></html>
阅读全文
0 0
- jQuery 效果
- JQuery效果
- jQuery 效果
- jQuery 效果
- jquery效果
- Jquery效果
- jquery效果
- jQuery效果
- jquery效果
- jQuery-----效果
- jQuery--效果
- jQuery 效果
- JQuery效果
- jquery效果
- jquery效果
- jQuery效果
- jQuery效果
- jQuery效果
- MySQL Key值(PRI, UNI, MUL)的含义
- Eclipse Logcat没有输出,主要集中在华为或者安卓7.0版本以上的手机
- JAVA错误:The public type *** must be defined in its own file***
- c++ 虚继承与继承的差异
- 多重循环&数组
- jQuery 效果
- 【程序员的碎碎念】越碎片越焦虑
- iOS GameController连接游戏手柄
- Node.js/Express学习笔记_01 安装与配置Node.js
- Jsp文件修改后不生效怎么办?
- C++知识点之类型转换函数
- 关于EXPORT_SYMBOL的作用浅析
- 字符串的最大平方串
- Node.js/Express学习笔记_02 快速开始express