Guest User

Untitled

a guest
Jul 23rd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. [data-role=page]{height: 100% !important; position:relative !important;}
  2. [data-role=footer]{bottom:0; position:absolute !important; top: auto !important; width:100%;}
  3.  
  4. $(function(){
  5. checkWindowHeight();
  6. $(document).bind('orientationchange',function(event){
  7. checkWindowHeight();
  8. })
  9. });
  10.  
  11. function checkWindowHeight(){
  12. $('[data-role=content]').each(function(){
  13. var containerHeight = parseInt($(this).css('height'));
  14. var windowHeight = parseInt(window.innerHeight);
  15. if(containerHeight+118 < windowHeight){
  16. var newHeight = windowHeight-118;
  17. $(this).css('min-height', newHeight+'px');
  18. }
  19. });
  20. }
Add Comment
Please, Sign In to add comment