Assuming data is an XML Node object, $(data).find("result").length is fine. Without parentheses, length not a method. There is a method that does the same thing, size() , although there is no real advantage to using it.
(If data was actually a string, you should first parse this into an XML document. Passing non-HTML markup to $() is the wrong thing and sometimes works just luck.)
bobince
source share