... and would like to understand this particular bit of the above code
What does the following bit mean? I've never seen logic like this before.
if (x) x =
Is this a comparison / some kind of logical operator? I'm wondering if it's a way to detect whether x is NULL and so get information from the immediate parent element. Nevertheless, I'd like to understand what it means.
So it's really saying;
"if the autocomplete-list currently defined as x exists, x is all the elements with tagname 'div'"
Is that correct?
If it is, you're a star, I've not come across a syntax option like the above before.