Day 6/30 #30DaysofCoding

Neha Sharma
1 min readDec 10, 2016

--

In this, I added css3 filters and to add interactivity I have added the vanilla Javascript code.

I have added 3 buttons with 3 different css filters effect. On click on respective button the filter will be apply on the image.

The logic was simple — I made 3 classes in css and added the data attribute to the button tag.

Onclick of the button, though Javascript I am reading the data-attribute and putting class on the image.

--

--

Neha Sharma
Neha Sharma

Written by Neha Sharma

Tech Lead; Brain behind JSLovers, Tech Speaker; ❤ Calligraphy and Chai. https://twitter.com/hellonehha; My Dev Journey: https://www.instagram.com/devgirllife/

No responses yet