How can I check which element is selected?

show more you code to understand