I want to change the background color of a div which already has a backkground color that is white for odd element and grey for even element. Dont know why its not working in Jsfiddle. The div is also having a ng-click which i have not used in JSfiddle example. I want to change the color of the div which is clicked to yellow color. Here is JsFiddle Link....LINK
Basic Code-
<div ng-app="myApp">
<div ng-controller='Ctrl'>
<div ng-repeat='item in jsonContacts' ng-style='{"left":($last?lastX:null)+"px","top":($last?lastY:null)+"px"}'>{{item}}</div>
</div>
</div>