diff --git a/src/traversing.js b/src/traversing.js index f7c86f13..85976a3c 100644 --- a/src/traversing.js +++ b/src/traversing.js @@ -52,7 +52,8 @@ jQuery.fn.extend({ }, closest: function( selector, context ) { - var pos = jQuery.expr.match.POS.test( selector ) ? jQuery(selector) : null; + var pos = jQuery.expr.match.POS.test( selector ) ? + jQuery( selector, context || this.context ) : null; return this.map(function(){ var cur = this, closer = 0;