Difference between revisions of "Template:ETH Zurich"

m
m
Line 82: Line 82:
  
 
$(function(){ // document ready
 
$(function(){ // document ready
document.getElementById('sideFiller').style.height = getStyle(document.getElementById('topContainer'),'height');
+
var ht = getStyle(document.getElementById('topContainer'),'height');
 +
document.getElementById('sideFiller').style.height = ht;
 
   if (!!$('#sidemenu').offset()) { // make sure ".sticky" element exists
 
   if (!!$('#sidemenu').offset()) { // make sure ".sticky" element exists
 
     var stickyTop = $('#sidemenu').offset().top; // returns number  
 
     var stickyTop = $('#sidemenu').offset().top; // returns number  
Line 88: Line 89:
 
       var windowTop = $(window).scrollTop(); // returns number  
 
       var windowTop = $(window).scrollTop(); // returns number  
 
       if (stickyTop < windowTop){
 
       if (stickyTop < windowTop){
         $('#sidemenu').css({ position: 'fixed', top: '50px' , width: '11%'});
+
         $('#sidemenu').css({ position: 'fixed', top: '50px' , width: '12%'});
 
       }
 
       }
 
       else {
 
       else {
         $('#sidemenu').css({ position: 'relative', top: '0px' , width: 'auto'});
+
         $('#sidemenu').css({ position: 'relative', top: ht , width: 'auto'});
 
       }
 
       }
 
     });
 
     });

Revision as of 16:44, 19 August 2015

We would like to thank our sponsors