在以下JavaScript代码中,有一个dollar($)符号.这是什么意思?
$(window).bind('load', function() {
$('img.protect').protectImage();
});
Run Code Online (Sandbox Code Playgroud) 该live()方法在jQuery 1.7中已弃用.jQuery文档现在推荐
使用
.on()附加的事件处理程序.旧版jQuery的用户应该.delegate()优先使用.live().
我知道如何on和delegate工作,但我不明白为什么他们是更好的.live()更简单,更容易使用.
有没有理由live被弃用?其他方法如何更好?如果我继续使用,会发生什么不好的事live吗?