Report abuse

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
@@ -756,10 +756,15 @@ if ( document.addEventListener ) {
 	});
 }

 jQuery.each(["bind", "one"], function( i, name ) {
 	jQuery.fn[ name ] = function( type, data, fn ) {
+		// Redirect for live objects
+		if ( this.isLive && name === "bind" ) {
+			return this.live(type, data, fn);
+		}
+		
 		// Handle object literals
 		if ( typeof type === "object" ) {
 			for ( var key in type ) {
 				this[ name ](key, data, type[key], fn);
 			}
@@ -782,12 +787,32 @@ jQuery.each(["bind", "one"], function( i, name ) {
 				jQuery.event.add( this, type, handler, data );
 			});
 	};
 });

+function jQueryLive( selector , context ) {
+	jQuery.extend(this,{
+		selector: selector,
+		context: context,
+		length: 0,
+		isLive: true
+	});
+}
+
+jQueryLive.prototype = jQuery.fn;
+
+jQuery.live = function( selector , context ) {
+	return new jQueryLive( selector , context );
+};
+
 jQuery.fn.extend({
 	unbind: function( type, fn ) {
+		// Redirect for live objects
+		if ( this.isLive ) {
+			return this.die(type, data, fn);
+		}
+		
 		// Handle object literals
 		if ( typeof type === "object" && !type.preventDefault ) {
 			for ( var key in type ) {
 				this.unbind(key, type[key]);
 			}


/* SAMPLE USAGE FOR RAUL IPISH */

$.live(".subElements","#parent").click(functor).hover(functorIn,functorOut);