I have a function:
function togglePopup1() {
document.getElementById('desktop-card').style.width = '480px';
}
The code is for width
of the page to increase with a click.
But how do I make this change happen, for example, in 2 seconds? I've looked everywhere and have not figured out how to enter a runtime.
In addition to width
, there are several other CSS properties that also change at the same time.