You shouldn’t stop this type of jumping. You need to diagnose your dog's issue and remedy that. If your dog is just stressed being in a new situation, you should calmly get them off of you, offer them a treat to calm them down, and have them sit politely beside you until their stress level has subsided (or take them somewhere else so that they can calm down if it is taking a while for them to calm down.) But most of all, please do not just ignore this behavior change.
Liz London is a certified dog trainer through the Certifying Council of Professional Dog Trainers (CPDT-KA) & the Karen Pryor Academy (Dog Trainer Foundations Certification) with regular continuing education courses from the top animal trainers from all over the world. She has trained zoo animals, search & rescue canines, gundogs, and helped people raise happy, healthy, and well-behaved canine companions for over ten years.
Dogs with poor social skills oftentimes just don’t know better. They will bounce off of everything, jump on everyone, run around like crazy, and investigate everything they can get their paws, snout, and eyes on! These dogs can come from any background, whether a rescue or puppy from a great breeder; if they haven’t had experience in new places and new situations, this can be how they respond.
Also, it's your job to never let anyone else allow your puppy to jump up on them! They will say, "It's OK, she's just a puppy, I don't mind if she jumps on me". You must rush in and pull the puppy down immediately, put your pup in a sit, praise the puppy then scold the person ! Continue to hold the puppy in a sit and let the person greet the pup. Explain to them they can never allow the puppy to jump on them - the puppy must sit to be greeted. To stop the jumping up behavior in pups, I do as much people training as puppy training!
By playing some simple games like fetch with your dog, you can kill 2 birds with one stone. First is that the actual playing of the game will surely tire them out so much that they won’t have the energy to jump the fence. Second is that you are associating the fun of the game with the yard. If they have fond memories of the yard they will be less likely to try and get out.
To a dog, space and balance are very important. If you take a step backwards or lean out of a jumping dog’s way, it will continue to jump. To a dog, it is overtaking your space, which only pack leaders are allowed to do. When a dog jumps, step into the dog. Picture a sphere around you and are not going to allow anyone or anything to come into your space. When the dog jumps, step into it sideways with your body, shoulder towards the dog. Don't face the dog head-on (you may not have time to turn so don’t worry about it if this is the case). You are not trying to knock the dog down, although this may happen. Don’t be alarmed if you do knock the dog over. Although you don’t want to abuse the dog by knocking it around, this may actually go a long way toward breaking it of the jumping habit as it will create a negative experience. Dogs are incredibly physical creatures and can withstand a lot of physicality without any harm. The odds of inflicting any serious injury are miniscule. You are simply calmly filling up your space with your body, and in return, setting the dog off-balance, which is an uncomfortable feeling for a dog. Lean slightly forward, not backward. Never lean backward, as you will be giving the dog that space. Casually and calmly, keep filling your space, not allowing room for the dog to come in. Remember, your goal is not to knock the dog down, it's just to retain your space.
I remember going to a dog park where a little 4-month-old Boxer puppy ran around jumping on everyone. The dog was not heavy enough to knock most of the adults down. However, it left everyone with muddy pants and the dog was big enough to knock over small children. The owner did nothing to stop the jumping puppy. After all, it was just a small pup. Everyone around her was pretty annoyed at the muddy prints the dog was leaving all over their clothes. That is an owner who will have a problem with her dog jumping on people when it gets older.