在jQuery 1.7之后不推荐使用live()和bind()的原因是什么 [英] What are the reasons that live() and bind() are deprecated post jQuery 1.7

查看:67
本文介绍了在jQuery 1.7之后不推荐使用live()和bind()的原因是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从jQuery 1.7开始,不推荐使用 .live() .bind()而不是 .on()正在使用
。这两个伟大的功能都像魅力一样工作。删除的目的是什么?这背后的技术原因是什么?

As of post jQuery 1.7 the .live() and .bind() are deprecated and instead of that .on() is being used. Both of these were great functions were working like charm. What is purpose of removal? What is the technical reason behind that?

为什么 .on()被提供使用?

推荐答案

引用此文章


  1. 你不能使用live for可重用的小部件。

  1. You can’t use live for reusable widgets.

stopPropagate()在现场不起作用

stopPropagate() doesn’t work in live

生活更慢

生活无法连结

这篇关于在jQuery 1.7之后不推荐使用live()和bind()的原因是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆