Now that Bootstrap 5 has dropped jQuery I am going through a project and 'slimming it down' with standard JS. However there is one part where I was using jQuery to provide a transition effect using:
$('#form-1').hide('slow');
$('#form-2').show('slow');
I can replace this with standard JS using:
document.querySelector('#form-1').style.display = 'none';
document.querySelector('#form-2').style.display = 'block';
However, this results in an instant transition :( Is there a way to slow the transition using standard JS?
Note: the effect was not to fade or to slide in or out the forms but it assembled the forms with a build like effect. I.e. this was not a change in opacity nor was it an animated motion effect. BTW I'm also looking to see if anyone knows of a JS equivalent to the previous jQuery rather than adding some CSS.