I just spent 2.5 hours debugging some JavaScript. Turns out it was an extra line break being added to the HTML output by a Joomla extension that was b0rking the selector. ARGH!!