I was having the same issue and found the problem (which seems to happen on WebKit browsers... had same problem on Chrome)... In my case, the elements that I was trying to match were inside a .clone ()'ed element. I found that after I clone'ed if I do not insert it into DOM, then using multiple selectors fails in safari and Chrome (interestingly, however, if I used the ':input' selector helper it works...)... I am able to use a single selector just fine (same as you).
Although I used with form elements, I assume the problem I encountered is very similar to yours. If your $(xml) is not yet in DOM, then create a hidden element and append it to it, then try your "find". This may be a bug in WebKit or jQuery... not sure...Hopefully the information above helps you with your issue. I have created a test page of the problem (again... only seen in Safari and Chrome) here: http://jsbin.com/equto On May 6, 4:13 pm, "nate.bridi" <nate.br...@gmail.com> wrote: > Hello, I have an input box searching a XML file for a string. Anything > the user types in, the script searches through the XML file in the > "name" and "conference" tags for results. This works just fine in > Firefox. However, inSafari, it only returns a result when a single > search result is found. I've narrowed it down to this line, and I have > no idea what is wrong with it. Am I wrong in my use ofselectorsin > this way? Or is it a Webkit bug? > > $(xml).find('name:contains("' +searchString+ '"),conference:contains > ("' +searchString+ '")').each(function() { > ....print results.... > > });