JSFiddle - React, Tailwind, and code Playground
by newsong80
HTML
<div id="flyin">
Flyer
</div>
CSS
#flyin {width:100px; height:100px; background:#efefef; position:absolute; left:-100px;}
JavaScript
// Calculate current broser width.
var currWidth = $(window).width();
console.log(currWidth);
var startPos = -100;
var endPos = (currWidth / 2) + (startPos / 2);
console.log(endPos);
$('#flyin').animate({left: endPos}, 1000);