I am facing an issue with the Jquery animate
function. Despite trying various solutions, I have been unable to get it to work. Below is the HTML code that I have used:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script>
$(".show").click(function () {
$(".error-box").animate({
transform: "translateX(0%)",
}, 500);
});
</script>
<style>
.error-box {
transform: translateX(-100%);
}
</style>
</head>
<body>
<div class="error-box">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Tempore,
excepturi?
</div>
<button class="show">Göster</button>
</body>
</html>