Team:UCLA/anuved verma ucla2014 workspace

From 2014.igem.org

(Difference between revisions)
 
(124 intermediate revisions not shown)
Line 1: Line 1:
-
{{:Team:UCLA/Template}}
+
<html>
-
{{CSS/Main}}
+
<h1>Hello</h1>
-
 
+
<p>lsdkjfclksdhflkjwehlrjfhlkwejrhfkljwehrlkjfwhlekjrhf</p>
-
 
+
<h2>Hello</h2>
-
<html lang="en">
+
<ul>
-
<head>
+
<li>item1</li>
-
<meta http-equiv="Content-Type" content="text/html; charset="UTF-8"/>
+
<li>item2</li>
-
</head>
+
<li>item3</li>
-
 
+
</ul>
-
<body>
+
<h3>Hello</h3>
-
<div id="box" style="width: 200px; height: 200px; background: red;"></div>
+
<img src="https://static.igem.org/mediawiki/2014/b/b7/2014placeholderimage.jpg"/>
-
 
+
-
<script type="text/javascript" charset="utf-8">
+
-
function addEvent(obj,evt,fn,capture){
+
-
evt=evt.replace('on','');
+
-
if(obj.attachEvent){
+
-
obj.attachEvent('on'+ evt,fn);
+
-
}
+
-
else{
+
-
if(!capture){
+
-
capture=false;
+
-
obj.addEventListener(evt,fn,capture);
+
-
}
+
-
}
+
-
}
+
-
function moveDiv(obj, distance, speed){
+
-
if(!distance){distance=250;}
+
-
if(!speed){speed=500;} //in milliseconds
+
-
+
-
if(!obj.styel.marginLeft){obj.style.marginLeft= 0 + 'px';}
+
-
+
-
var timer = null,
+
-
startTime = (new Date).getTime(),
+
-
elapsed = null,
+
-
d = null;
+
-
+
-
+
-
timer = setInterval(function(){
+
-
elapsed = (new Date).getTime - startTime;
+
-
if(elapsed < speed){
+
-
//Do animation
+
-
d = elapsed/speed*distance;
+
-
obj.style.marginLeft = 0 + 'px';
+
-
}
+
-
else{
+
-
//Stop animation
+
-
clearInterval(timer);
+
-
obj.style.marginLeft = distance + 'px';
+
-
}
+
-
}, 5);
+
-
+
-
}
+
-
var box = document.getElementById('box');
+
-
addEvent(box, 'click', function(){
+
-
moveDiv(box,250,1000);
+
-
})
+
-
</script>
+
-
</body>
+
</html>
</html>

Latest revision as of 00:51, 27 February 2015

Hello

lsdkjfclksdhflkjwehlrjfhlkwejrhfkljwehrlkjfwhlekjrhf

Hello

  • item1
  • item2
  • item3

Hello