This video sewing tutorial shows you how to sew elastic to any garment (leg openings, necklines, etc) using a zigzag on your sewing machine.
The secret is choosing the correct elastic and setting your stitch length. You need a zigzag that is long enough to allow good recovery. Also, it is very important to stretch the ELASTIC, not the fabric. If you stretch your fabric as you sew, you will end up with a wavy opening that does not stay flat and the elastic won't be able to recover as well.