$did is the ID that triggered the event. $did($did) gets the text of the id that triggered the event (it's equivalent to $did($did).text or $did(2).text).