Salt, and Dawn. However, there is a caveat to this working which is that the normal vinegar you usually buy in the store is probably NOT the right vinegar to use.
Drown these annoying creatures by setting out a bowl of apple cider vinegar with three drops of dish soap in it. The fruit flies will be attracted by the scent, then sink and drown in the mixture. Or, pour some apple cider vinegar into a jar or glass, then cover it with plastic wrap...