3
I have a function:
function togglePopup1() {
document.getElementById('desktop-card').style.width = '480px';
}
The code is so that the width
page increase with one click.
But how do I make this change happen, for example, in 2 seconds? I’ve looked everywhere and couldn’t find how to insert a runtime.
Besides width
, there are several other CSS properties that are also changed at the same time.
How so happen in 2 seconds? Take 2 seconds to trigger the event or the duration of the animation is 2 seconds ?
– Pedro Augusto