$("span").stop(false,1):仍然执行完此次动画再停止;$("span").stop();无参数或只有一个参数,会停止所有动画
2015-06-21
("div").unbind("click dblclick"),这种好像移除不了双击事件啊
2015-06-21
emove()方法删除所选元素本身和子元素,通过添加过滤参数指定需要删除的某些元素;
empty()方法则只删除全部所选元素的子元素内容.
empty()方法则只删除全部所选元素的子元素内容.
2015-06-21
$("#content").css("background-color","red").css("color","white");
$("#content").css({"background-color":"red","color":"white"});注意加大括号
$("#content").css({"background-color":"red","color":"white"});注意加大括号
2015-06-21
$(".drag").each(function(index, data){
$(this).draggable({axis: index == 0? "x":"y"});
});
$(this).draggable({axis: index == 0? "x":"y"});
});
2015-06-20
$(".drag").each(function(index, data){
if(index == 0){
$(this).draggable({axis: "x"});
}
else {
$(this).draggable({axis: "y"});
}
});
if(index == 0){
$(this).draggable({axis: "x"});
}
else {
$(this).draggable({axis: "y"});
}
});
2015-06-20
出现个 type="hidden"的<input id="hidval" type="hidden" value="0"/>,好陌生啊,不打好理解~~
2015-06-19
绑定事件的方法.bind()最好改成.on() 之前版本绑定事件的方法有bind,live,delegate,现在新版本统一成on了
2015-06-19
评论不能直接回复,无解啊!trigger()顾名思义触发(事件),不用点击、鼠标移动等操作就能实现元素上绑定的事件。当然click()也有同样的功能。trigger()和click()实现触发事件的区别在于trigger(e,extraParameters)可以传参数。详见jQuery官网API
2015-06-19
$("#frmTest :checkbox").attr("disabled",true);这里的true要不要双引号都是可以的吧!
2015-06-19