JSFiddle - React, Tailwind, and code Playground
HTML
<div class="loadbanner" id="member-home"><img class="img-responsive" src="newsimg/banner1810.jpg" /></div>
CSS
.loadbanner{padding:10px;background-color:#fff;border:1px solid #d8d8d8;
width: 520px;
height: 748px;
position: fixed;
right: -550px;
top: 45px;
-moz-box-shadow: 0 0 6px #000;
-webkit-box-shadow: 0 0 6px #000;
box-shadow: 0 0 6px #000;
z-index: 200;
}
JavaScript
function loadbanner() {
var $memberHome = $("#member-home");
if ($memberHome.position().right < 0) {
$memberHome.animate({ right: "0" }).delay(10000).animate({ right: "-550px" });
}
else {
$memberHome.animate({ right: "0" }).delay(10000).animate({ right: "-550px" });
}
}
$(document).ready(function() {
loadbanner();
});