最赞回答 / uhelper_net
$this与$(this)是相等的.一般使用这个将jquery对象转换为一个变量是考虑性能优化.每次查找或转换都有性能损耗,直接用变量缓存,可以减少这部分执行.
2015-05-22
最新回答 / 事与愿违的牵挂
不知道你想怎么阻止选中文字,如果只是单纯的不想点击左键选中文字可以用css控制,-moz-user-select: none; /*火狐*/-webkit-user-select: none; /*webkit浏览器*/-ms-user-select: none; /*IE10*/-khtml-user-select: none; /*早期浏览器*/user-select: none;
2015-05-21
$("#btntest").bind("click mouseout",function(){
$(this).attr("disabled","true");
})
$(this).attr("disabled","true");
})
2015-05-21
$("div").unbind("click dblclick")
2015-05-21
格式中参数少了一个 应该为:$.get(url,[callback][type]) $.post(url,[callback][type]) [type]也是可选参数 默认为字符串
2015-05-21
slideToggle(3000,funciton(){
//向上滑,向下滑
})
//向上滑,向下滑
})
2015-05-21
$(元素).after/before(内容) //在元素的后面/前面插入内容
$(内容).appendTo(元素) //把内容添加到元素
$(内容).appendTo(元素) //把内容添加到元素
2015-05-21