Dogs like and need consistency, so if you are not allowing your dog to jump on you, everyone in the family and everyone who greets the dog must do the same. You, as an owner, must make sure this happens. It will only confuse a dog if you allow them to jump on some people who say they do not mind, and tell him not to jump on others. Once you decide you do not wish your dog to jump on people you must apply this to everyone at all times unless you give the dog a command to jump. A dog should never jump on a human of its own free will.
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.
1. To assert dominance. Whether it's jumping on people or jumping on furniture, both instances illustrate a dog that wants to raise his station in life. By jumping on you or jumping on the couch, he's saying that he's the pack leader--something that you DON'T want to happen, as a dominant dog is much more difficult to train (and can become quite aggressive). In either case, you'll definitely want to institute the proper alpha dog training techniques, if you haven't already.
A conflicting behavior when you come home—like “sit”—helps enormously. You’ll need to practice your puppy’s “sit” during calm moments first, and then ask for this polite behavior before you leave and when you arrive home. Guests will appreciate a polite “sit” when they arrive, too, as they won’t appreciate your puppy leaping around and mugging them for attention.
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!
Our inconsistency perpetuates the problem. Some of the time we tolerate the jumping and ignore it. Other times we reward the behavior by exchanging enthusiastic greetings. But when we're dressed up and the puppy's paws are muddy, it's a different story. Reprimanding the puppy for jumping up usually does not work. Either the puppy misunderstands the reprimand as praise or he gets even more excited and the jumping gets worse. If the reprimand is severe enough, the puppy may stop jumping at that moment but it doesn't solve the problem altogether; and it certainly is not a very nice thing to do. It's very similar to a person approaching you with a big smile, arm extended to exchange a hand-shake and you bopping the person in the nose. Even if your puppy learns that jumping up on you is not a good idea, he will usually get away with jumping up on everyone else.
When a dog jumps on a human of its own free will, it is not "greeting" the human, it is asserting its dominance over the human; it is the dog communicating that it is alpha and/or wishes to own/control the human. A subordinate would never dream of running over and jumping on the alpha dog of the pack. Space is respect and lower members of the pack respect the higher members. If your dog jumps on humans, it does not respect them. Note: when a young puppy jumps on humans it is sometimes its attempt to reach one's face. Puppies need to be taught not to jump up on humans as this behavior will manifest into other meanings as the puppy grows up into an adult dog.