---
title: "Jquery中的bind(),live(),delegate(),on()的区别（转）"
author: "Flighting_Chou"
date: "2016-04-15T11:22:59Z"
tags: []
categories: ["Web前端"]
slug: "jquery-bind-live-delegate-on"
draft: false
lastmod: "2016-04-15T11:23:39Z"
id: 2291481
url: "https://imyself.iteye.com/blog/2291481"
---

摘至：http://www.cnblogs.com/xilipu31/p/4105794.html

**相同点：**

1.都支持单元素多事件的绑定；空格相隔方式或者大括号替代方式；

2.均是通过事件冒泡方式，将事件传递到document进行事件的响应。

 

**比较和联系:**

1.bind()函数只能针对已经存在的元素进行事件的设置；但是live(),on(),delegate()均支持未来新添加元素的事件设置；

2.bind()函数在jquery1.7版本以前比较受推崇，1.7版本出来之后，官方已经不推荐用bind()，替代函数为on(),这也是1.7版本新添加的函数，同样，可以用来代替live()函数，live()函数在1.9版本已经删除；

3.live()函数和delegate()函数两者类似，但是live()函数在执行速度，灵活性和CSS选择器支持方面较delegate()差些，想了解具体情况，请戳这：[http://kb.cnblogs.com/page/94469/](http://kb.cnblogs.com/page/94469/ "http://kb.cnblogs.com/page/94469/")

4.bind()支持Jquery所有版本；live()支持jquery1.8-；delegate()支持jquery1.4.2+；on()支持jquery1.7+。