javascript - How do I apply the browser height to a CSS class? -


You can read your browser dimensions with jquery $$ document.height or with simple js with height:

It does not need to be done - you need to find a way to apply height in the CSS class is not needed. In your HTML, every & lt; Div & gt; Give a square:

   

Then use a jQuery code like this:

  var document_height = $ (document) .height (); $ ('.portport_height'). CSS ('height', document_height + 'px');       

Onresize to recalculate the event and apply altitude whenever the viewpoint height changes.


Comments