I am trying to set a dynamic height to tablesorter scroll.
The general idea is the following: my table will be browsed with different devices, laptop, mobiles and tablets; I can set the initial value of the scroller (I.e. scroller_height : 500 ) but I would like to set this value dynamically according to the screen resolution and the screen orientation. I mean: if I browse the table from my laptop (1366 x 768) I would like to have the scroller_height : 500, if browse my table with the desktop monitor (1920 x 1080) I would like to have a scroller_height : 600. Moreover I could browse that table with my tablet both in landscape or in portrait mode; in case of orientation change the table width is automatically adjusted to fit the "changed" width: I would like to have the same behavior for the height. I.E. laptop res 1280 x 800 : if I browse the table in landscape I would like to have the scroller_height : 500, if I rotate the device I would like to adjust the height to (for example) scroller_height : 800. In general I would like to:
In theory I have all clear. Practically I have no idea.
Any idea?
In the latest version, if you set the scroller_height
option to zero or an empty string, the scroller will be set to full height. Then all you would need to do is add a css media query to set the desired max-height
.