简单教程
提交运行
代码编辑器:
<!DOCTYPE html> <meta charset="utf-8"> <link href="/static/next/css/tryit.css?v=2017082407" rel="stylesheet"/> <script src="https://cdn.staticfile.org/jquery/2.2.4/jquery.min.js"></script> <script> $(document).ready(function(){ $("#disable").click(function(){ jQuery.fx.off = true; }); $("#enable").click(function(){ jQuery.fx.off = false; }); $("#toggle").click(function(){ $("div").toggle("slow"); }); }); </script> <p>当“切换动画”开关按钮被按下时,我们伴着缓慢的动画在隐藏和显示div之间切换。按“启用”或“禁用”来打开和关闭动画</p> <button id="disable">jQuery.fx.off = true ( 禁用 )</button> <button id="enable">jQuery.fx.off = false ( 启用 )</button> <br><br> <button id="toggle">切换动画</button> <div style="background:#98bf21;height:100px;width:100px;margin:50px;"> </div> <footer>简单教程,简单编程<br/>Copyright © 简单教程 www.twle.cn</footer>
运行结果: