We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b256a3a commit e03aee1Copy full SHA for e03aee1
src/traversing.js
@@ -52,7 +52,8 @@ jQuery.fn.extend({
52
},
53
54
closest: function( selector, context ) {
55
- var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null;
+ var pos = jQuery.expr.match.POS.test( selector ) ?
56
+ jQuery( selector, context || this.context ) : null;
57
58
return this.map(function(){
59
var cur = this, closer = 0;
0 commit comments