Team:UNIK Copenhagen/test
From 2014.igem.org
(Difference between revisions)
Line 1: | Line 1: | ||
- | < | + | <html> |
+ | <style type="text/css"> | ||
+ | #container{ | ||
+ | width:604px; | ||
+ | height:453px; | ||
+ | position:relative; | ||
+ | } | ||
+ | #container ul{ | ||
+ | width:604px; | ||
+ | height:453px; | ||
+ | list-style:none outside none; | ||
+ | position:relative; | ||
+ | overflow:hidden; | ||
+ | } | ||
+ | |||
- | + | #container li:first-child{ | |
- | + | display:list-item; | |
- | + | position:absolute; | |
- | + | } | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | #container li{ | |
- | + | position:absolute; | |
- | + | display:none; | |
- | + | } | |
- | + | #container .prevButton{ | |
+ | height:72px; | ||
+ | width:68px; | ||
+ | position:absolute; | ||
+ | background:url('https://static.igem.org/mediawiki/2014/e/ed/Team_UNIK_Copenhagen_go_to_the_top.PNG') no-repeat; | ||
+ | top:50%; | ||
+ | margin-top:-36px; | ||
+ | cursor:pointer; | ||
+ | z-index:2000; | ||
+ | background-position:left top; | ||
+ | left:0 | ||
+ | } | ||
- | + | #container .prevButton:hover{ | |
- | + | background-position:left bottom;left:0;} | |
- | + | </style> | |
- | + | ||
- | + | ||
- | { | + | |
- | + | ||
- | } | + | |
- | </ | + | |
- | + | ||
+ | <script> | ||
+ | $(window).load(function(){ | ||
+ | var pages = $('#container li'), current=0; | ||
+ | var currentPage,nextPage; | ||
- | + | $('#container .button').click(function(){ | |
- | + | currentPage= pages.eq(current); | |
- | + | if($(this).hasClass('prevButton')) | |
- | + | { | |
- | + | ||
- | + | if (current <= 0) | |
- | + | current=pages.length-1; | |
- | + | else | |
- | + | current=current-1; | |
- | + | } | |
- | + | else | |
- | + | { | |
- | + | if (current >= pages.length-1) | |
- | + | current=0; | |
- | + | else | |
- | + | current=current+1; | |
- | + | } | |
- | + | nextPage = pages.eq(current); | |
- | + | currentPage.hide(); | |
- | + | nextPage.show(); | |
- | + | }); | |
- | + | }); | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
</script> | </script> | ||
- | |||
- | </ | + | <div id="container"> |
+ | <ul> | ||
+ | <li><img src="https://static.igem.org/mediawiki/2014/4/4f/Team_UNIK_Copenhagen_EASY_logo.PNG"></li> | ||
+ | <li><img src="https://static.igem.org/mediawiki/2014/7/73/Team_UNIK_Copenhagen_green_lego_brick.PNG.jpg"></li> | ||
+ | <li><img src="https://static.igem.org/mediawiki/2014/b/bf/Team_UNIK_Copenhagen_Split_GFP_gene_1.PNG"></li> | ||
+ | </ul> | ||
+ | <span class="button prevButton"></span> | ||
+ | <span class="button nextButton"></span> | ||
+ | </div> | ||
+ | </html> |
Revision as of 20:08, 6 August 2014