Coughing up clear jelly balls may be caused by catarrh, a buildup of mucus in the airways. This may occur due to allergies, infections such as colds or flu, pollution, or nasal polyps.
If symptoms continue for more than a few weeks, it is best to contact a doctor to find out the cause and get treatment.