Optimizing the event declaration in ideaList.js