Doubt about how to work with (getViewportHeight())

Asked

Viewed 28 times

0

I have a problem. I have a Javascript library that creates a slider that can be folded horizontally. What I need is that the height of the block has a specific height according to the viewport browser. For example: If the browser has 600px, the block will have 600px - 50px, getting the height of 550px If the browser has 768px, the block would have 718px. I discovered in the library the following code fragment

slider.viewport.height(getViewportHeight());

I guess I’d have to work with that. Can someone give an idea or indicate a path?

Grateful.

1 answer

0

If that method slider.viewport.height() is what arrow the size of your slider, why not use slider.viewport.height(window.innerHeight - 50) ?

Browser other questions tagged

You are not signed in. Login or sign up in order to post.