JSFiddle - React, Tailwind, and code Playground
HTML
<div id="testBox"></div>
CSS
#testBox {width:50px; height:50px; border:2px solid blue;}
.w1280 #testBox {width:100px; border-color:grey}
.w1440 #testBox {width:150px; border-color:green}
.w1680 #testBox {width:200px; border-color:gold}
.wLarge #testBox {width:300px; border-color:red}
JavaScript
function on_resize(c,t){onresize=function(){clearTimeout(t);t=setTimeout(c,100)};return c};
on_resize(function() {
var width = $(window).width(),
new_class = width > 1600 ? 'wLarge' :
width > 1440 ? 'w1680' :
width > 1280 ? 'w1440' :
width > 1024 ? 'w1280' : '';
$(document.body).removeClass('wLarge w1680 w1440 w1280').addClass(new_class);
})();