Select All The Elements That Contributed To Berlioz's Unique Sound

Add an attribute data-selected to each element?

Now, doSomething() only gets triggered when the selection changes. I want to trigger doSomething() when the user selects any option, possibly the same one again. I have tried using an "onClick" handler, but that gets triggered before the user starts the selection process. So, is there a way to trigger a function on every select by the user? Update: The answer suggested by Darryl seemed to work ...