The students holding the rope will shake the rope up and down so the oscillations are in the same direction as the slats. The wave will pass through the slats unhindered. The wave with up and down oscillations will not travel through the slats when they are in this orientation. Two students are making a vertical wave with a coiled spring through the picket fence. The long spring can oscillate in the vertical direction, but can generally not wave in the horizontal direction except for certain modes.
Electromagnetic waves are also transverse.
Hold a piece of polarizing lens up to a light source so the light is viewed through it. Rotate the lens and notice that the intensity of the light does not appear to change. Hold two pieces of polarizing lens up to a light source. Hold one piece stationary but rotate the other like the piece of fence section. Notice the intensity of the light changes as this second filter is rotated.