Things I learned the hard way XIVII
jQuery
When the DOM isn't reacting to your javascript selectors as expected try a little specificity:
instead of this:
do this:
$("#item_id > a")
$("#item_id > ul > li > a'")
You’re first code block shouldn’t work.
the ‘>’ denotes a ‘child element,’ and ‘a’ is not a child of #item_id, but a great-grand child.
$(‘#item_id a’) would be the proper selector, as it would match ALL generations under ‘#item_id’