I would say it's more of a sign of affection :)
Tht pretty cute if a dogs wants to hug you
If he's hugging your ankle and humping, it means that he REALLY likes you!
If you mean he jumps up and puts his paws over your shoulders, unless you've taught him to do it intentionally, its more of a dominance thing than anything. Hes jumping up so he can be eye level with you