Skip to content
Advertisement

How to add transition or fade-in effect to dynamically added field

I have input section with add/delete button, that adds extra input fields. I am trying to get input field appear with a transition effect instead of popping up instantly.

I tried to use transition but it didn’t helped. Is it possible to do it via pure CSS?

Code

JavaScript
JavaScript
JavaScript

Advertisement

Answer

I don’t use jQuery so had to use a little vanilla Javascript but essentially the transition is applied to the table-row and uses opacity from 0 – 1 to create the fade-in effect.

JavaScript
JavaScript
JavaScript
Advertisement