$.find doesn't work with Zepto objects #565

hay opened this Issue Aug 17, 2012 · 1 comment


None yet

2 participants

hay commented Aug 17, 2012

Consider a piece of code like this:

var $root = $("#a");
var $child = $(".b");
var $el = $root.find( $child );

This will give a Uncaught Error: SYNTAX_ERR: DOM Exception 12 because of a faulty use of document.querySelectorAll that only accepts strings or NodeLists, not Zepto objects.

jQuery's find has been accepting jQuery objects since 1.6 (link), so many people might expect this functionality to be in Zepto as well (i did at least :).

I've made a JS Bin here: http://jsbin.com/ijoqup/1/edit

@mislav mislav was assigned Oct 7, 2012
@mislav mislav closed this in 2efb3fb Mar 3, 2013
hay commented Mar 3, 2013

Cool, thanks for fixing this!

@lopper lopper added a commit to buddydvd/zepto that referenced this issue Apr 24, 2013
@mislav @lopper mislav + lopper jQuery compat: `find`, `closest` accept element args
Fix #565
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment