Team:UCLA/anuved verma ucla2014 workspace

From 2014.igem.org

(Difference between revisions)
Line 1: Line 1:
-
{{:Team:UCLA/Template}}
+
{{:Team:UCLA/Template/CSS}}
-
{{CSS/Main}}
+
 +
<html>
 +
<script type="text/javascript" src="http://code.jquery.com/jquery-1.8.0.min.js"></script>
 +
<script type="text/javascript">
 +
$(document).ready(function() {
 +
//$("h2").hide();
 +
 +
$("h2").click(function() {
 +
$("h2").hide(1000);
 +
});
 +
});
 +
</script>
-
<html lang="en">
+
<style>
-
<head>
+
#menu li{
-
<meta http-equiv="Content-Type" content="text/html; charset="UTF-8"/>
+
position:relative;
-
</head>
+
float:left;
 +
list-style:none;
 +
}
 +
#menu a{
 +
color:white;
 +
background:black;
 +
padding:5px;
 +
text-decoration:none;
 +
width:98px;
 +
display:block;
 +
text-align:center;
 +
}
 +
#menu{
 +
margin-left:auto;
 +
margin-right:auto;
 +
width:900px;
 +
}
 +
#menu a:hover{
 +
background:deepskyblue;
 +
}
-
<body>
+
#menu li ul{
-
<div id="box" style="width: 200px; height: 200px; background: red;"></div>
+
background:black;
-
 
+
display:none;
-
<script type="text/javascript" charset="utf-8">
+
position:absolute;
-
function addEvent(obj,evt,fn,capture){
+
text-align:center;
-
evt=evt.replace('on','');
+
top:25px;
-
if(obj.attachEvent) obj.attachEvent('on'+ evt,fn);
+
        right:0px;
-
else{
+
-
if(!capture)
+
-
capture=false;
+
-
obj.addEventListener(evt,fn,capture);
+
-
}
+
}
}
-
function moveDiv(obj,distance,speed){
+
#menu li:hover ul{
-
if(!distance)
+
display:block;
-
distance=250;
+
-
if(!speed)
+
-
speed=500;
+
-
if(!obj.style.marginLeft)
+
-
obj.style.marginLeft=0+'px';
+
-
var timer=null,
+
-
startTime=(new Date).getTime(),
+
-
elapsed=null,
+
-
d=null,
+
-
dir='right',
+
-
current_distance=obj.style.marginLeft.replace('px','');
+
-
if(distance<current_distance)
+
-
dir='left';
+
-
timer=setInterval(function(){
+
-
elapsed=(new Date).getTime()- startTime;
+
-
if(elapsed<speed){
+
-
if(dir=='right'){
+
-
d=elapsed/speed*distance;
+
-
obj.style.marginLeft=d+'px';
+
-
}
+
-
else{
+
-
d=elapsed/speed*distance;
+
-
d=current_distance- d;
+
-
obj.style.marginLeft=d+'px';
+
-
}
+
-
}
+
-
else{
+
-
clearInterval(timer);
+
-
obj.style.marginLeft=distance+'px';
+
-
}
+
-
},5);
+
}
}
-
var box = document.getElementById('box');
+
#dropdown_menu li ul li{
-
addEvent(box, 'click', function(){
+
position:relative;
-
moveDiv(box,250,1000);
+
}
-
})
+
</style>
-
</script>
+
 
-
</body>
+
 
 +
<ul id = "menu">
 +
<li><a href="/Team:UCLA">Home</a></li>
 +
 +
        <li><a href="/Team:UCLA/Team">Team</a>
 +
        <ul>
 +
    <li><a href="/Team:UCLA/meet_the_team">Meet the Team</a></li>
 +
    <li><a href="https://igem.org/Team.cgi?year=2014&team_name=UCLA">Official Profile</a></li>
 +
        </ul>
 +
        </li>
 +
 +
        <li><a href="/Team:UCLA/Project">Project</a>
 +
<ul>
 +
    <li><a href="/Team:UCLA/Project/Customizing Silk">Customizing Silk Properties</a></li>
 +
    <li><a href="/Team:UCLA/Project/Functionalizing Fibers">Functionalizing Fibers</a></li>
 +
    <li><a href="/Team:UCLA/Project/Spinning Silk">Spinning Silk</a></li>
 +
            <li><a href="#">Human Practices</a></li>
 +
</ul>
 +
</li>
 +
       
 +
        <li><a href="/Team:UCLA/Parts">Parts</a>
 +
<!--<ul>
 +
    <li><a href="#">Page1</a></li>
 +
    <li><a href="#">Page2</a></li>
 +
    <li><a href="#">Page3</a></li>
 +
</ul>-->
 +
</li>
 +
 
 +
        <li><a href="/Team:UCLA/Modeling">Modeling</a></li>
 +
 
 +
        <li><a href="/Team:UCLA/Notebook">Notebook</a>
 +
<ul>
 +
    <li><a href="/Team:UCLA/Notebook/Protocols">Protocols</a></li>
 +
    <li><a href="/Team:UCLA/Notebook/Calendar">Calendar</a></li>
 +
    <li><a href="/Team:UCLA/Notebook/Weekly Notes">Weekly Notes</a></li>
 +
</ul>
 +
        </li>
 +
 
 +
        <li><a href="/Team:UCLA/Safety">Safety</a></li>
 +
 
 +
        <li><a href="/Team:UCLA/Attributions">Attributions</a></li>
 +
</ul>
 +
<a href="https://2014.igem.org/Main_Page"> <img src="https://static.igem.org/mediawiki/igem.org/6/60/Igemlogo_300px.png" width="55px"></a>
 +
 
 +
<h2>Click Here.</h2>
</html>
</html>

Revision as of 04:14, 16 July 2014

Click Here.