Team:KAIST Korea/Team

From 2013.igem.org

(Difference between revisions)
 
(3 intermediate revisions not shown)
Line 1: Line 1:
-
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<head>
-
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
+
-
<meta charset="UTF-8">
+
  <style type="text/css" media="screen">
 +
    body    {
 +
      background-color: #aaaaaa;
 +
      font: 10px futura, helvetica, helvetica neue;
 +
    }
 +
    #credits {
 +
      position: absolute;
 +
      bottom:  10px; right: 10px;
 +
      opacity:  0.5;
 +
    }
 +
    #slider {
 +
      width: 400px;
 +
      margin: auto;
 +
    }
 +
    #container {
 +
      background-color: #aaaaaa;
 +
    position:        relative;
 +
      border:          0px solid red;
 +
      height:          400px;
 +
      margin:          auto;
 +
    margin-top :      100px;
 +
    margin-bottom :  40px;
 +
    overflow:        hidden;
 +
  }
 +
</style>
 +
 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="generator" content="MediaWiki 1.16.5" />
<meta name="generator" content="MediaWiki 1.16.5" />
Line 1,117: Line 1,141:
   
   
-
<div id="container">
+
-
<h1>Javascript Coverflow</h1>
+
-
<canvas id="cv"></canvas>
+
-
</div>
+
-
<script type="text/javascript" src="coverflow.js"></script>
+
-
<script type="text/javascript">
+
-
function $(id){return document.getElementById(id)};
+
-
window.onload = function()
+
-
{
+
-
var items = [
+
-
{src: 'https://dl.dropboxusercontent.com/u/202315040/igem/images/1.jpg', label: {album: 'All That I Am', artist: 'Santana'}},
+
-
{src: 'https://dl.dropboxusercontent.com/u/202315040/igem/images/2.jpg', label: {album: 'August & Everything After', artist: 'Counting Crows'}},
+
-
{src: 'https://dl.dropboxusercontent.com/u/202315040/igem/images/3.jpg', label: {album: 'Back to Bedlam', artist: 'James Blunt'}},
+
-
{src: 'https://dl.dropboxusercontent.com/u/202315040/igem/images/4.jpg', label: {album: 'Carnival of Rust', artist: 'Poets of the Fall'}},
+
-
+
-
];
+
-
for (var i = 0, j = items.length; i < items.length; i++)
+
-
{
+
-
var img = new Image();
+
-
img.onload = function()
+
-
{
+
-
if (--j == 0)
+
-
{
+
-
Coverflow.init($('cv'), items, {
+
-
onSelectCenter: function(item)
+
-
{
+
-
alert('Clicked: '+ item.label.album +' - '+ item.label.artist);
+
-
}
+
-
});
+
-
}
+
-
};
+
-
img.src = items[i].src;
+
-
}
+
-
}
+
-
</script>
+

Latest revision as of 10:13, 23 August 2013

Team:KAIST Korea/Project Background - 2013.igem.org