I think so this question is general question in that manner i am giving u answer.
Not in all cases but in few cases salary is major factor. because many people having habit of changing job for getting higher offer as well as higher post in the organization. but after curtain age of the person...