But after the death of Jehoiada, the leaders of Judah came to swear their loyalty to the king, and he listened to their advice.