As Frank Luke points out, the Hebrew word "kinah" (קנאה) as in "El kanna" in Exodus 20:5 (אל קנא) in both in OT Hebrew and in modern, is both jealous and zealous at the same time, and can have either positive or negative moral value depending on the subtext.
The name "Cain" in the story of Creation apparently comes from the same root, meaning someone who was jealous of his brother.
Another use of "kinah" meaning jealousy is Numbers 5:29 (AKJV):
This is the law of jealousies, when a wife goes aside to another instead of her husband, and is defiled
The NEV translation of Numbers 25:11 brings out the moral ambivalence of the word when used with the meaning "zealous" in one and the same verse:
"Phinehas son of Eleazar, the son of Aaron, the priest, has turned my anger away from the Israelites; for he was as zealous as I am for my honour among them, so that in my zeal I did not put an end to them."
Here the zeal of Pinehas is good, and averts the destructive zeal of God. In this verse the latter use of "kinah" alludes to the thorough and protracted nature of His punishment.
"Kanaim" (קנאים) are "zealots" or what we today call "extremists", in the sense that they are "jealous" of one particular opinion or position and will not tolerate any other.
The word can also be used to mean someone who is a perfectionist or persnickety in some matter. It is often used in modern Hebrew advertising as a boast that some manufacturer is zealous about his quality or some other attribute of his product.
So in the case of Exodus 20:5, the answer is that God is jealous of our time and attention, and of our recognition of Him as the only entity worthy of worship. Compare with Deuteronomy 6:4-9 where we are commanded to love God with all of our hearts and efforts. He wont tolerate us wasting our attention on other gods, even if they are non-entities, as in Deuteronomy 32:21,
"They have made me jealous with what is no god; they have provoked me to anger with their idols. So I will make them jealous with those who are no people; I will provoke them to anger with a foolish nation." (ESV)