Changeset 4601
- Timestamp:
- 02/03/08 04:33:11 (6 months ago)
- Location:
- trunk/jquery
- Files:
-
- 2 modified
-
src/event.js (modified) (1 diff)
-
test/unit/event.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jquery/src/event.js
r4600 r4601 110 110 if ( events ) { 111 111 // Unbind all events for the element 112 if ( types == undefined )112 if ( types == undefined || types[0] == "." ) 113 113 for ( var type in events ) 114 this.remove( elem, type );114 this.remove( elem, type + (types || "") ); 115 115 else { 116 116 // types is actually an event object here -
trunk/jquery/test/unit/event.js
r4436 r4601 73 73 expect(6); 74 74 75 $("#firstp").bind("custom.test",function(e){ 76 ok(true, "Custom event triggered"); 77 }); 78 75 79 $("#firstp").bind("click",function(e){ 76 80 ok(true, "Normal click triggered"); … … 92 96 // Trigger the remaining fn (1) 93 97 $("#firstp").trigger("click"); 98 99 // Remove the remaining fn 100 $("#firstp").unbind(".test"); 101 102 // Trigger the remaining fn (0) 103 $("#firstp").trigger("custom"); 94 104 95 105 // using contents will get comments regular, text, and comment nodes