|
|
(69 intermediate revisions by the same user not shown) |
Line 1: |
Line 1: |
| <html> | | <html> |
− |
| |
− | <script>
| |
− |
| |
− | $(document).ready(function(){
| |
− | var $blob = $("#upwards_blob"),
| |
− | $window = $(window),
| |
− | $pageheight = $(document).height()-$window.height(),
| |
− | topPadding = 15;
| |
− |
| |
− | console.log('pageheight:'+$pageheight);
| |
− | console.log('windowwidth:'+$window.width());
| |
− |
| |
− | $(window).scroll(function() {
| |
− | console.log($window.scrollTop()+' pageheight:'+$pageheight);
| |
− |
| |
− | if ($window.scrollTop() < 0.05*$pageheight) {
| |
− | console.log('lower');
| |
− | $blob.css({"transform":"translateX(0)"});
| |
− | }
| |
− |
| |
− | if ($window.scrollTop() > 0.05*$pageheight) {
| |
− | if ($window.scrollTop() <($pageheight-100)) {
| |
− | console.log('middle');
| |
− | $blob.css({"transform":"translateX(-150px)"});
| |
− | }
| |
− | }
| |
− |
| |
− | if ($window.width() < 1320) {
| |
− | if ($window.scrollTop() > ($pageheight-100)) {
| |
− | console.log('greater small');
| |
− | $blob.css({"transform":"translate(-150px, -100px)"});
| |
− | }
| |
− | }
| |
− |
| |
− | else {
| |
− | if ($window.scrollTop() > ($pageheight-430)) {
| |
− | console.log('greater wide');
| |
− | $blob.css({"transform":"translate(-150px, 0)"});
| |
− | if ($window.scrollTop() > $pageheight - 430) {
| |
− | $blob.css({
| |
− | "translateY": $window.scrollTop() - $pageheight + 430 + topPadding
| |
− | });
| |
− | }
| |
− | else {
| |
− | $blob.css({
| |
− | "translateY": "0"
| |
− | });
| |
− | }
| |
− | }
| |
− | }
| |
− | });
| |
− | });
| |
− |
| |
− | </script>
| |
| | | |
| <div class="content_background_wrapper"> | | <div class="content_background_wrapper"> |
| <div class="central_position_wrap"> | | <div class="central_position_wrap"> |
− | <div id="upwards_blob"><a href="#header"><img src="https://static.igem.org/mediawiki/2015/9/93/Freiburg_upwards_blob.png"></a></div>
| |
| <div class="background_image_left"><img src="https://static.igem.org/mediawiki/2015/8/85/Freiburg_wiki_background_2_parted_left.png"></div> | | <div class="background_image_left"><img src="https://static.igem.org/mediawiki/2015/8/85/Freiburg_wiki_background_2_parted_left.png"></div> |
| <div class="background_image_right"><img src="https://static.igem.org/mediawiki/2015/f/f4/Freiburg_wiki_background_2_parted_right.png"></div> | | <div class="background_image_right"><img src="https://static.igem.org/mediawiki/2015/f/f4/Freiburg_wiki_background_2_parted_right.png"></div> |
| <div class="page_content"> | | <div class="page_content"> |
| </html> | | </html> |