I have a blend of blue and white image with a white background. When the div is clicked, I want to switch the colors around (background to blue and blue part of the image to white, white part to blue).
Html :
<div class="col" ng-click="onHomeButtonClick()">
<img src="images/iconHome.png" class="menu-icons"><br>
</div>
Js code :
this.onHomeButtonClick = function($event){
$event.target.style.backgroundColor="DarkSlateBlue";
}
Tried so far :
By using
$event.target.style.backgroundColor="DarkSlateBlue";
I am only able to change the background color. How can I reverse the colors as desired?