Migrate older jQuery code to jQuery 1.9+