Anlina
I'd trim his claws to protect your legs, carry a squirt gun or spray bottle around to deter him when he does this undesirable behaviour, give him plenty of love, play and attention when he's behaving and don't reward the bad behaviour by giving him what he wants (attention.)
He should stop this behaviour pretty quick if it is not rewarding and has negative consequences.
Doing that everyday will assure that the behaviour doesn't return.
I totally agree with you by the way, Anilina.