“To err is human: To forgive, canine.”
Jumping is a natural way for dogs to greet each other and get attention. Therefore, it is necessary to show your dog an appropriate way to greet people. Consistency is key when teaching your dog not to jump. Some owners allow their dogs to jump on them at certain times, but not others. However, this inadvertently encourages jumping behavior (and confuses the heck out of your dog)!
If your dog already knows the 'sit' command, then this is where it really comes in handy. When you anticipate your dog jumping, have him/her 'sit'. It's physically impossible for your dog to sit and jump at the same time! Give calm praise for the 'sit', and reward the dog with a scratch on the chest. If you try to praise with petting on the head, often this will only encourage the jumping!
When you anticipate your dog jumping, have him/her 'sit'.
If your dog jumps on you, immediately turn away from him/her. Most dogs will continue jumping for about 10 seconds before trying another approach. Typically, they will come around and try to face you, and then jump again. If this happens, turn away from your dog, and continue to ignore the behavior. It's important to give no attention whatsoever to him/her- not even eye contact! It takes patience, since some dogs may continue jumping for several minutes before they stop. After your dog stops jumping for at least 2 seconds, you may turn to him/her to praise and pet her in the sitting position in a slow and low manner. If the dog starts to jump again, turn away from him/her. When he/she stops jumping, turn around and begin petting him/her again. Continue this until the dog realizes you will pet him/her only when he/she is not jumping.
As with all problem behaviors, please remember to teach your dog an alternate behavior in place of the problem behavior (i.e., teaching your dog to sit when you know your dog will jump!). Rough games should be avoided, as well as vigorous playful petting, as to not encourage the jumping behavior.