HTML expression throwing an exception in latest version of jQuery, but not in earlier one
The expression in red works fine in jQuery 1.2.6 but does not in 1.4.2.
Can someone assist?
jQuery(
"#menu_sample > li > a[@class=expanded]"
).find(
"+ ul"
).slideToggle(
"medium"
);
All the child li items for the following HTML should display:
<
li
><
a
class
="expanded"
href
="#">
Weather
</
a
><
ul
> (li items here)
Screenshot of exception attached.
Update: the following jQuery code solved the problem:
jQuery(
"#menu_sample > li > a"
).filter(
'[class=expanded]'
).find(
"+ ul"
).slideToggle(
"medium"
);
Did something change between 1.2.6 and 1.4.2 with respect to selecting <a> tags with a CSS class?