Then a pink-cheeked boy walked out and killed the giant, getting both Saul and Jonathan out of a bad situation. Jonathan had an idea of what was coming: the boy would be the next king, not Jonathan. So Jonathan made friends with him and helped him. After all, being second-in-command to a successful king was better than being a king who got killed by the Philistines.
Jonathan had the correct attitude towards jealousy. When an underling can do something better than you can, that underling may very well be a gift from God; someone to be appreciated and cared for.