JSFiddle - React, Tailwind, and code Playground

by rwaldron

HTML

<!DOCTYPE html>
<html>
    <head>
        <style type="text/css">
            #d {
                width:20%;
                position:absolute;
                left:0; top:1em;
                background-color:#CCC;
                color:#000;
                padding:2em;
            }
            #ta {
                width:20%;
                height:300px;
                margin-left:20%;
            }
            #ti {
                vertical-align:top;
                font-size:2em;
                margin-top:4.5em;
            }
        </style>

    </head>
    <body>
        <div id="d">Hover from div to textarea, div to page, page to div, and textarea to div.</div>
        <textarea id="ta"></textarea>
        <input id="ti" type="text"/>
    </body>
</html>

JavaScript

function hoverin(){
                    $(this).animate({paddingRight:"+=100px"})
                }
                function hoverout(){
                    $(this).animate({paddingRight:"-=100px"})
                }
                $("#d").hover(hoverin, hoverout)