The first fairies in a jar seem to date to the first decade of the present century, though if there any older examples we would love to know more…
And here is a fairy and a unicorn.
There has developed the idea that the fairies have a wish in the jar that can be opened and turned to the user’s advantage. Here is a horoscope version of wish but no imprisoned fairy from ebay.
And for an upmarket version, though pity the poor fairy