WD-40 isn't a true lubricant. It is a solvent. Follow it up with lubricant (silicone, grease, Teflon, graphite, ect.) I like the Blaster white lithium spray for the type application you are describing. While I haven't tried it, the WD-40 people make a comparable product called "WD-40 Specialist White Lithium Multipurpose Grease."
As a trivial note, the name WD-40 comes from the fact that it was the 40th iteration at the inventors attempt to develop a Water Displacement product. Water Displacement is not the same as lubrication.