hi M.;
i loved the advice you got from lisa and mischelle; i think it can be hard to know the difference sometimes for the moms AND for the child between what is and is not "behavioral" or somehow motivated. i thought both thier advice was sound.
my son did this for about 3 months; just before he turned 3 yrs old. he was very prone to colds in general, a big mucus head, he had recently given up his paci which was the source of a lot of his colds and mucus but which took months to totally clear up, he was eating too much dairy, AND, he was launching a major behavior campaign of acting out regarding jealousy of the baby, who is 20 months younger than him, so she was just starting to walk and crawl fast and get in his way. AT THE SAME TIME we were going through a major family stress-out because we were preparing to move, renovating the new place, my husband was working overtime, my sister was ill, and all told, our life was on it head. my son, suffice it to say, was not feeling well and he was extremely pissed off.
and he figured out one day when he cried and acidentally cried so hard he threw up, that he could make himself do this, and stop everything around him in it's tracks and get all my attention AND freak me out.
this may sound excessive, but my pediatrician, who is a very VERY gentle dispenser of advice re correcting problem behaviors, said to explain tto him the next time he cries and seems like he might do this, that i don't have any clean clothes and that if he throws up he will have to stay in it for a while. well, that's what i did. i couldn't believe it but i did it, and he tested me, and i made him stay pukey for about ten minutes, not a second more; we were at home fortunately so i was able to make a big show of finding clean clothes, and in the meanwhile he was so unhappy that the memory stayed with him. i didn't "punish" him beyond that. the next time i saw this coming down the pike i reminded him how yukky it was, we were in the car, and i said, "we're out of the house, i don't have clean clothes for you so don't throw up because we can't change till we get home," and he slowed himself down and stopped.
but here is the thing re your daughter; she's not as old as my son was and probably not as verbal because she's younger. so you might want to work on it from a "show don't tell" stand point, like be really compassionate to the tantrum, and hold her and start doing deep breathing and she might follow you, and this should help slow her down a bit. remember that tantrums are often really caused by something upsetting to the baby, so try to find out what's making her upset and correct it from your end. that's NOT 'spoiling.' that's teachiing her to cope, and being compassionate to her. if she keeps up with it and if you really think she's doing it on purpose, try letting her stay pukey for not more than 5 minutes; it's not about torturing her, it's about cause and effect.
i would cut out the juice right away. my kids never drank juice because they eat a lot of fruit and they don't drink milk except with cookies once in a great while, because they eat a lot of dairy. try not giving her these things. give her water to drink, kids love ice water, and make sure she's getting the nutrients from food instead. it could be that the juice is not the culprit of the mucus but maybe the taste of the juice is too strong, which causes her to cough a little and then spit up mucus she has for other reasons. sugar will also cause mucus in some kids.
is she using a paci? if so, think about only using it in the house; as soon as i could get my son to leave his at home his mucus and colds reduced and once he stopped using it all together they went away completely. my daughter only uses hers for nap and night night and has none of these problems.
lastly i would say, i only realized in retrospect that the gagging and throwing up in my son was the result of a HUGE constellation of problems, and i have a lot of guilt now about not seeing it all at the time. but once i did realize what was happening i started using much better parenting techniques to help him improve his behavior, specifically the "1-2-3 Magic" system, BY THE BOOK, consistently, and i showed him a lot more patience and compassion. don't beat yourself up if you think something is wrong, just look at the big picture and take into consideration all the possibilities of what could be going on w your little girl.
J.