"\\[ *(@)S *([!*$^=]*) *('?\"?)(.*?)\\4 *\\]",
// Match: [div], [div p]
- "(\\[)\s*(.*?)\s*\\]",
+ "(\\[)\\s*(.*?)\\s*\\]",
// Match: :contains('foo')
"(:)S\\(\"?'?([^\\)]*?)\"?'?\\)",
// Detach an event or set of events from an element
remove: function(element, type, handler) {
if (element.events)
- if (type && element.events[type])
+ if ( type && type.type )
+ delete element.events[ type.type ][ type.handler.guid ];
+ else if (type && element.events[type])
if ( handler )
delete element.events[type][handler.guid];
else
args.unshift( event );
for ( var j in c ) {
+ // Pass in a reference to the handler function itself
+ // So that we can later remove it
+ args[0].handler = c[j];
+
if ( c[j].apply( this, args ) === false ) {
event.preventDefault();
event.stopPropagation();
* Get a set of elements containing the unique ancestors of the matched
* set of elements (except for the root element).
*
- * @example $("span").ancestors()
- * @before <html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html>
- * @result [ <body>...</body>, <div>...</div>, <p><span>Hello</span></p> ]
- *
- * @name ancestors
- * @type jQuery
- * @cat DOM/Traversing
- */
-
- /**
- * Get a set of elements containing the unique ancestors of the matched
- * set of elements, and filtered by an expression.
- *
- * @example $("span").ancestors("p")
- * @before <html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html>
- * @result [ <p><span>Hello</span></p> ]
- *
- * @name ancestors
- * @type jQuery
- * @param String expr An expression to filter the ancestors with
- * @cat DOM/Traversing
- */
- ancestors: jQuery.parents,
-
- /**
- * Get a set of elements containing the unique ancestors of the matched
- * set of elements (except for the root element).
- *
- * @example $("span").ancestors()
+ * @example $("span").parents()
* @before <html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html>
* @result [ <body>...</body>, <div>...</div>, <p><span>Hello</span></p> ]
*
* Get a set of elements containing the unique ancestors of the matched
* set of elements, and filtered by an expression.
*
- * @example $("span").ancestors("p")
+ * @example $("span").parents("p")
* @before <html><body><div><p><span>Hello</span></p><span>Hello Again</span></div></body></html>
* @result [ <p><span>Hello</span></p> ]
*