Peel the eggs and place in the bottom of a clean, quart-sized glass jar.
In a medium saucepan, add the vinegar, water (or beet juice if using), the onion (and jalapeno if using), sugar, and spices. Bring to a boil and cook, uncovered, until the sugar has dissolved and the onions are translucent, about 5 minutes. Remove from heat and let cool a few minutes.
Pour the vinegar onion mixture over the eggs in the jar, covering the eggs completely. If you are making the beet pickled eggs, place some or all of the cooked beets in with the eggs in the jar (this will help to bring color to the eggs, and you will have pickled beets as well.) Secure close the jar's cover. Refrigerate up to a month.The pickled eggs will be ready to eat after a few days. The longer the eggs sit in the pickling juice, the more the pickling juice will penetrate the eggs.