JSFiddle - React, Tailwind, and code Playground
by lottikarotti
HTML
<div id="header"><span id="content"></span></div>
CSS
#header {
width: 100% ;
min-width: 300px ;
height: 100px ;
background-color: #EAEAEA ;
}
JavaScript
$(document).ready ( function( ) {
currentw( ) ;
} ) ;
$(window) .resize( function( ) { currentw( ) ; } ) ;
function currentw( ) {
var h = $('content') ;
var br = '<br />' ;
h.html(
'width: ' + h.css( 'width' ) + br +
'min-width: ' + h.css( 'min-width' ) + br +
'current: ' + h.width( )
) ;
} ;