Update onSelected.js