JSFiddle - React, Tailwind, and code Playground

by Guruprasad Rao

HTML

<div id="a_fixed_position_div">
    Fixed Div
</div>

<div class='originalPlace'>
    Original Place
    <div class='anywhere_div'>AnyWhere Div</div>
</div>

JavaScript

$(window).on('resize',function(){
if ($(window).width() < 1024) {
    jQuery('.anywhere_div').insertAfter('#a_fixed_position_div');
}
else
{
    jQuery(".anywhere_div").detach().appendTo('.originalPlace')
}
});