Ревность describes jealousy of personal emotional relations only - mainly love and friendship. Let us say A loves both B and C but C does not want A to love B because C is jealous. It is described like C ревнует B(Accusative) к A(Dative).
For example:
"Ты ревнуешь меня к моей машине"="you feel jealous of my warm intimate relations with my car and want that all my feelings would belong to you only".
Зависть is a negative emotion towards someone who has anything that you haven't, mainly material possessions but also happiness, social position, natural talents etc.
"Ты завидуешь, что у меня машина" = "You envy that I have a car".
"Ты звидуешь моему счастью" = "You envy at my happiness."