Puppy Jealous of Other Animals

I have a 5 month old mini schnauzer and yorkie mix. Lately, if we try to pet our cat or if we pet another dog, she becomes really jealous and tries to nip at the animal while trying to jump on our lap. Any advice on how to train her to not do this?