JSFiddle - React, Tailwind, and code Playground

by dkrotts

HTML

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/twitter-bootstrap/2.2.2/css/bootstrap-combined.min.css">
<!doctype html>
<html>
    <head></head>
<body>
    <div id="foo">Foo</div>
    <div id="bar">Bar</div>
</body>
</html>

JavaScript

$(document).ready(function () {

    $('#foo').__proto__.focus = function(msg) {
        console.log(msg);   
    }

    $('#bar').focus('Focus bar');
    
    setTimeout(function() {
        $('#foo').focus('Focus foo');        
    }, 2000);

});