Difference between revisions of "Team:CCU Taiwan/Our Plan"

Line 62: Line 62:
  
 
});
 
});
 +
// The function actually applying the offset
 +
function offsetAnchor() {
 +
  if (location.hash.length !== 0) {
 +
    window.scrollTo(window.scrollX, window.scrollY - 90);
 +
  }
 +
}
  
$(window).scroll(function() {
+
// Captures click events of all <a> elements with href starting with #
    var wintop = $(window).scrollTop(), docheight =
+
$(document).on('click', 'a[href^="#"]', function(event) {
 +
  // Click events are captured before hashchanges. Timeout
 +
  // causes offsetAnchor to be called after the page jump.
 +
  window.setTimeout(function() {
 +
    offsetAnchor();
 +
  }, 0);
 +
});
  
    $(document).height(), winheight = $(window).height();
+
// Set the offset when entering page with hash present in the url
    var scrolled = (wintop/(docheight-winheight))*100;
+
window.setTimeout(offsetAnchor, 0);
 
+
    $('.scroll-line').css('height', (scrolled*0.5 + '%'));
+
$(document).scroll(function () { // remove "$"
});
+
    var y = $(this).scrollTop();      
 +
    if (y > 300) {
 +
        $('.indicator').fadeIn();
 +
    }
 +
    else {
 +
        $('.indicator').fadeOut();
 +
    }
 +
});
 
 
var s = skrollr.init({
 
render: function(data) {
 
  //Log the current scroll position.
 
  $('#info').text(data.curTop);
 
}
 
});;
 
 
 
 
</script>
 
</script>

Revision as of 21:10, 14 October 2018

DryLab Overview

  We tested and studied the physical and chemical properties of lignin, explore the advantages and disadvantages of lignin lining on paper containers. By conducting lamination and pulping experiments, we adjust and optimize the way of laminating, so that lignin can meet the needs of laminating factories and recycling companies