JSFiddle - React, Tailwind, and code Playground
HTML
<div class="className" style="display: inline-block">
<p>Centered In The Middle Of The Page With jQuery</p>
</div>
JavaScript
$(document).ready(function(){
$(window).resize(function(){
$('.className').css({
position:'absolute',
left: ($(window).width()
- $('.className').outerWidth())/2,
top: ($(window).height()
- $('.className').outerHeight())/2
});
});
// To initially run the function:
$(window).resize();
});