Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Horizontal table scroll proof of concept:
  2.  
  3.     var intialTableHeight = $(".table-wr").height();
  4.  
  5.     function horTableScroll() {
  6.         var tableHeight = $(window).height() - $(".table-wr").offset().top + $(window).scrollTop();
  7.         if (intialTableHeight > tableHeight) {
  8.             $(".table-wr").css('height', tableHeight);
  9.         }
  10.     }
  11.     horTableScroll();
  12.  
  13.     $(window).scroll(function(){
  14.         horTableScroll();
  15.     })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement