(Created page with "{{Rice}} <html> <head> <style> h1 { font-family: "Abadi MT Condensed Extra Bold", Helvetica, Arial; font-size: 30px; font-style: normal; font-variant: normal; font-w...") |
|||
Line 70: | Line 70: | ||
<body> | <body> | ||
<br><br><br><br><br><br><br><br><br><br><br><br><br><br> | <br><br><br><br><br><br><br><br><br><br><br><br><br><br> | ||
− | <div class = "fixed_flyer" id = " | + | <div class = "fixed_flyer" id = "sec1" style="position:relative;z-index:8;"> |
<h1 style="color:white">Introduction</h1> | <h1 style="color:white">Introduction</h1> | ||
</div> | </div> | ||
Line 77: | Line 77: | ||
</p> | </p> | ||
</div> | </div> | ||
− | <div class = "fixed_flyer" id = " | + | <div class = "fixed_flyer" id = "sec2" style="position:relative;z-index:9;"> |
<h1 style="color:white">Background</h1> | <h1 style="color:white">Background</h1> | ||
</div> | </div> | ||
Line 84: | Line 84: | ||
</p> | </p> | ||
<ol> | <ol> | ||
− | <li><p>Bio Bistro</p></li> | + | <li><p>Bio Bistro: and insert the one sentence description here</p></li> |
<li><p>Kit of Parts</p></li> | <li><p>Kit of Parts</p></li> | ||
<li><p>See DNA</p></li> | <li><p>See DNA</p></li> | ||
Line 92: | Line 92: | ||
</ol> | </ol> | ||
</div> | </div> | ||
− | <div class = "fixed_flyer" id = " | + | <div class = "fixed_flyer" id = "sec3" style="position:relative;z-index:10;"> |
+ | <h1 style="color:white">Significance</h1> | ||
+ | </div> | ||
+ | <div class="pagediv"> | ||
+ | <p>insert timeline thingy</p> | ||
+ | </div> | ||
+ | <div class = "fixed_flyer" id = "sec4" style="position:relative;z-index:11;"> | ||
<h1 style="color:white">Significance</h1> | <h1 style="color:white">Significance</h1> | ||
</div> | </div> | ||
Line 99: | Line 105: | ||
</div> | </div> | ||
</body> | </body> | ||
+ | |||
+ | <script> | ||
+ | $(document).ready(function(){ | ||
+ | var sec1=$(".fixed_flyer#sec1"); | ||
+ | var sec1_pos=sec1.offset().top; | ||
+ | var sec2=$(".fixed_flyer#sec2"); | ||
+ | var sec2_pos=sec2.offset().top; | ||
+ | var sec3=$(".fixed_flyer#sec3"); | ||
+ | var sec3_pos=sec3.offset().top; | ||
+ | var sec4=$(".fixed_flyer#sec4"); | ||
+ | var sec4_pos=sec4.offset().top; | ||
+ | $(window).scroll(function () { | ||
+ | var y=$(this).scrollTop(); | ||
+ | console.log('new position-----------------------'); | ||
+ | console.log('y:',y); | ||
+ | console.log('sec1:', sec1_pos); | ||
+ | console.log('sec2:', sec2_pos); | ||
+ | console.log('sec3:', sec3_pos); | ||
+ | if(y<sec2_pos-40){ | ||
+ | if (y>sec1_pos){ | ||
+ | sec1.stop().animate({'top':y-sec1_pos},1); | ||
+ | } | ||
+ | } else { | ||
+ | sec1.stop().animate({'top':10},1); | ||
+ | }; | ||
+ | if(y<sec3-40){ | ||
+ | if(y>sec2_pos){ | ||
+ | sec2.stop().animate({'top':y-sec2_pos},1); | ||
+ | } | ||
+ | } else { | ||
+ | sec2.stop().animate({'top':10},1); | ||
+ | }; | ||
+ | if(y<sec4-40){ | ||
+ | if(y>sec3_pos){ | ||
+ | sec3.stop().animate({'top':y-sec3_pos},1); | ||
+ | } | ||
+ | } else { | ||
+ | sec3.stop().animate({'top':10},1); | ||
+ | }; | ||
+ | if(y<3000){ | ||
+ | if(y>sec4_pos){ | ||
+ | sec4.stop().animate({'top':y-sec4_pos},1); | ||
+ | } | ||
+ | } else { | ||
+ | sec4.stop().animate({'top':10},1); | ||
+ | }; | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
</html> | </html> |
Revision as of 23:37, 17 October 2016