How to hide a whole component on selecting a radio button

I am working on html file. I have two two labels(say L1 and L2). Each label has two radio buttons. I want to hide L2 and it’s radio buttons if a user selects any radio button from L1.

I know this can be done using java script but how to capture the selection of radio buttons on which i can execute my java script.