WELCOME TO UCLA IGEM
Team:UCLA
From 2013.igem.org
(Difference between revisions)
Dewalgupta (Talk | contribs) |
Dewalgupta (Talk | contribs) |
||
Line 1: | Line 1: | ||
{{:Team:UCLA/Template}} | {{:Team:UCLA/Template}} | ||
+ | |||
<html><head> | <html><head> | ||
+ | <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.1/jquery.min.js"></script> | ||
+ | <script> | ||
+ | $(document).ready(function(){ | ||
+ | |||
+ | |||
+ | var $window = $(window); //You forgot this line in the above example | ||
+ | |||
+ | $('section[data-type="background"]').each(function(){ | ||
+ | var $bgobj = $(this); // assigning the object | ||
+ | $(window).scroll(function() { | ||
+ | var yPos = -($window.scrollTop() / $bgobj.data('speed')); | ||
+ | // Put together our final background position | ||
+ | var coords = '50% '+ yPos + 'px'; | ||
+ | // Move the background | ||
+ | $bgobj.css({ backgroundPosition: coords }); | ||
+ | }); | ||
+ | }); | ||
+ | }); | ||
+ | </script> | ||
<title>UCLA iGEM </title> | <title>UCLA iGEM </title> | ||
<style> | <style> | ||
Line 13: | Line 33: | ||
width: 100%; | width: 100%; | ||
font-size: 5em; | font-size: 5em; | ||
+ | color: #fff; | ||
} | } | ||
#content { | #content { | ||
Line 21: | Line 42: | ||
</head> | </head> | ||
<body> | <body> | ||
- | + | ||
- | + | <section id="slide" data-type="background" data-speed="10"><br><article><p>WELCOME TO UCLA IGEM</p></article><br><br><br><br> | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | <section id="slide" data-type="background" data-speed="10"><br>< | + | |
</section> | </section> | ||
- | <img src="https://static.igem.org/mediawiki/2013/f/f9/Ucla_bg2.png" width="960"> | + | |
+ | <!--<img src="https://static.igem.org/mediawiki/2013/f/f9/Ucla_bg2.png" width="960">--> | ||
</body> | </body> | ||
</html> | </html> |
Revision as of 23:10, 25 September 2013