If you start from the bottom of the legs, cast on 3 times as many stitches as you want to work for your pattern, work a few rows in knit 3, purl 3 until it's as long as you want the ruffle to be, then knit a row of 3 stitches together and start your regular pattern. You'll knit the 3 knit stitches together, then knit the 3 purl stitches together. If you start at the waist and work down to the cuff knit in the front and back of each stitch for a row, knit each stitch for the second row, knit front and back of each stitch for another row and so on until you like the ruffle. Just avoid straight stockingnette stitch so the ruffle will ruffle and not curl. You might need to use a bigger needle for the ruffle than you do for the longies. Sounds cute!