Team:ATOMS-Turkiye/deneme
From 2013.igem.org
Line 3: | Line 3: | ||
<html> | <html> | ||
- | + | <script> | |
- | + | function openPage(pg){ | |
- | + | item = $("#slideshow items").children("div").eq(pg-1); | |
- | + | content=$("#slideshow #right"); | |
- | + | content.fadeOut(200); | |
- | + | content.html(item.find("#text").html()); | |
- | + | content.fadeIn(200); | |
- | + | image = item.find("#image"); | |
- | + | image.css("position","relative"); | |
- | + | imagebox = $("#slideshow").find( "#imagebox"); | |
- | + | imagebox.fadeOut(200); | |
- | + | //image.width(imagebox.width()); | |
- | + | image.height(imagebox.height()-$("#pager").height()); | |
- | + | imagebox.html(image.clone()); | |
- | + | imagebox.fadeIn(200); | |
- | + | } | |
- | + | function initSlideShow(a){ | |
- | + | items=a.children("items"); | |
- | + | l = items.children("div").length; | |
- | + | pager = a.find("#pager"); | |
- | + | pages="<ul class='slide-pager'>"; | |
- | + | for( i=1;i<=l;i++ ) | |
- | + | pages+="<li onclick='openPage("+i+");' ><a href='#' class='no-action'>"+i+"</a></li> "; | |
- | + | pager.html(pages); | |
- | + | openPage(1); | |
- | + | } | |
- | + | $(document).ready(function(){ | |
- | + | initSlideShow( $("#slideshow") ); | |
- | + | $(".no-action").click(function (e){e.preventDefault();return true;}); | |
- | + | }); | |
- | + | </script> | |
<div style="margin:4em;"width:50%;> | <div style="margin:4em;"width:50%;> | ||
<div id="slideshow" class="box" style="width:100%;height:300px;"> | <div id="slideshow" class="box" style="width:100%;height:300px;"> | ||
Line 85: | Line 85: | ||
<div id="right" style="width:100%;height:100%;"> | <div id="right" style="width:100%;height:100%;"> | ||
content here | content here | ||
- | |||
</div> | </div> | ||
</div> | </div> | ||
- | </div> | + | </div> |
+ | </div> | ||
</html> | </html> |
Revision as of 10:25, 1 October 2013