Water acts like glue. When you turn the jar upside down, the water droplets in each hole of the pantyhose stick together. The water does not fall through the holes in the pantyhose because all the drops in all the holes form a 'skin' of water which seals the jar and prevents the water from flowing out.