JSFiddle - React, Tailwind, and code Playground

by qustosh

JavaScript

//PASSING PARAMETERS TO CALLBACK FUNCTIONS
var body = $("body");

var el = $("<div />").css({
    "width": "100px",
    "height": "100px",
    "position": "absolute",
    "left": "0px",
    "top": "0px",
    "background-color": "pink"
}).appendTo(body);


(function(){

var name = "Mike";    
function go(){
        console.log("go " + name)
}

el.animate({
    "left":"300px"
},500,go)
    
    

})()