Adding data-selected attribute while selecting item

Fixes #381 by adding 'data-selected' attribute while selecting an item.