I have a list and when user hover or click on the list then respective image will display on right side.
Below script I am using for add and remove active class from