JSFiddle - React, Tailwind, and code Playground

HTML

<!DOCTYPE html> 
<html> 
    <head>    </head>
    <body>
        <div class="page" style="border: 2px solid rgb(0, 0, 0); width:80%; height:2000px;">
            sdf
            <div style="position: relative;"> 
                <div id="sidebarPage1" style="position: absolute; right: -40px; top: 50px; display: block">         <img src="http://washingtonbus.org/twitter_vertical.png" title=""/>     </div>
            </div>
        </div>
        </body>
        </html>

JavaScript

$(window).scroll(function() {
        $('#sidebarPage1').stop();
        $('#sidebarPage1').animate({ top: $(this).scrollTop() + 50 + "px" }, 'slow');
    });