It might be worth putting in a comment here about why we can't use jQuery delegation for this easily (because we need to be able to handle events on the buttons first, but the click handler on the parent items is attached by the dropdown class itself, and because jQuery delegation doesn't itself simulate bubbling from nested elements, the click handlers on the parent items would get first shot). Otherwise I could imagine someone trying to do that later on as a cleanup and not realizing why it wouldn't work.