I'm looking to achieve a specific effect using pure JavaScript, HTML, and CSS without the need for jQuery or other libraries. I want an element to fade in and smoothly move to the center of the page from the left after a button click event.
My attempt so far is as follows:
if(selected_property[0] == 1 && selected_property[1] == 1) {
var left = 0;
setInterval(function(){
left = left + 0.05;
document.getElementById("property1_img").style.left = left + "vw";
document.getElementById("property1_img").style.visibility = "visible";
}, 1);
} else {
}