Added basic js to check selection changed