JSFiddle - React, Tailwind, and code Playground

by kougiland

HTML

<img title="yo" src="http://sp.life123.com/bm.pix/eat-healthy-2.s600x600.jpg" id="aerobot" align="right" />

CSS

body {height: 600px; overflow:scroll;}

img {z-index:1000;top:0; left:0;position:absolute;width: 300px; height: auto; float:left;}

JavaScript

var $scrollingDiv = $("#aerobot");
        $(window).scroll(function(){            
            $scrollingDiv
                .stop()
                .animate({"marginTop": ($(window).scrollTop() + 0) + "px"}, "slow" );          
        });