JSFiddle - React, Tailwind, and code Playground
CSS
html, body {
width: 100%;
height: 100%;
}
.element {
position: absolute;
top: 100px;
left: 100px;
width: 300px;
height: 300px;
background : #ff0;
}
JavaScript
var element = $("<div class='element' />");
$( "body" ).on( "touchstart", addElement );
function addElement() {
$( "body" ).append( element );
element.on( "touchmove", doStuff );
element.trigger("touchmove");
}
function doStuff() {
$('body').append('a ')
}