JSFiddle - React, Tailwind, and code Playground
by Alex
HTML
<p>I am text.<p/>
<div id="apagar">apagar</div>
CSS
html {
background: white;
color: red;
font-size: 1.4em;
}
html.mobile {
background: blue;
color: white;
font-size: 1em;
}
JavaScript
$(document).ready(function() {
var $window = $(window),
$html = $('html');
if ($window.width() < 514) {
$('#apagar').remove();
}
$html.removeClass('mobile');
(function($) {
var $window = $(window),
$html = $('html');
$window.resize(function resize() {
if ($window.width() < 514) {
$('#apagar').remove();
}
$html.removeClass('mobile');
}).trigger('resize');
})(jQuery);
});