Doubt about working with (getViewportHeight ())

0

I have a problem. I have a Javascript library that creates a horizontal slider. What I need is that the height of the block has a specific height depending on the% of browser%. For example: If the browser has viewport , the block will have 600px , getting height of 600px - 50px If the browser has 550px , the block would have 768px . I discovered the following code fragment in the library

slider.viewport.height(getViewportHeight());

I think I would have to work with it. Can anyone give an idea or indicate a path?

Thank you.

    
asked by anonymous 03.06.2015 / 18:42

1 answer

0

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

    
03.06.2015 / 19:12