My problem is I don't know how to implement the Jquery code into a react app
This is an alternating side coming in transform
I regularly use this code in my applications to add a little motion to the page, but I obviously can't use Jquery in react so how would I go about getting the same functionality in to a react app
Html Code
<div class="box-wrapper loading"><div class="box"></div></div> <div class="box-wrapper loading"><div class="box"></div></div>CSS Code
body { overflow-x: hidden; } .box-wrapper { -webkit-transition-duration: 600ms; transition-duration: 600ms; } .box-wrapper.loading:nth-child(odd) { transform: translate(100%); } .box-wrapper.loading:nth-child(even) { transform: translate(-100%); }Issue:
Javascript Code
$(".box-wrapper").each(function (index, element) { setTimeout(function () { element.classList.remove("loading"); }, index * 600); });