编辑这个页面须要登录或更高权限!
检查当前的元素是否含有某个特定的类,如果有,则返回true。
这其实就是 is("." + class)。
用于匹配的类名
给包含有某个类的元素进行一个动画。
<div class="protected"></div><div></div>
$("div").click(function(){ if ( $(this).hasClass("protected") ) $(this) .animate({ left: -10 }) .animate({ left: 10 }) .animate({ left: -10 }) .animate({ left: 10 }) .animate({ left: 0 }); });
过滤 |
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。