Team:Cambridge/Templates/HybridBook

From 2010.igem.org

(Difference between revisions)
m
Line 3: Line 3:
<script>
<script>
$(document).ready(function() {
$(document).ready(function() {
-
   $('#slidemarginleft button').click(function() {
+
   $('#projectlink').click(function() {
    
    
     var $marginLefty = $("#superwide");
     var $marginLefty = $("#superwide");
     $marginLefty.animate({
     $marginLefty.animate({
-
       marginLeft: parseInt($marginLefty.css('marginLeft'),10) == 0 ?
+
       marginLeft: -770
-
        -770:
+
       
-
         0
+
    });
 +
  });
 +
$('#lablink').click(function() {
 +
 
 +
    var $marginLefty = $("#superwide");
 +
    $marginLefty.animate({
 +
      marginLeft: 0
 +
          
     });
     });
   });
   });
Line 16: Line 23:
</script>
</script>
<div style="width:730px; background-color:#fad72a;" class="secheader">Notebook: Week 1</div>
<div style="width:730px; background-color:#fad72a;" class="secheader">Notebook: Week 1</div>
-
<div style="position:relative">
+
<div style="position:relative; height:30px;border-top:5px solid white;">
-
<div style="width:360px; background-color:#fad72a;" class="secheader">Project diary</div>
+
<div style="width:368px;position:absolute; background-color:#fad72a; height:30px;" id="projectlink">Project diary</div>
-
<div style="width:360px; background-color:#fad72a;left:370px" class="secheader">Lab book</div>
+
<div style="width:368px; position:absolute; background-color:#fad72a;left:373px; height:30px;" id="lablink">Lab book</div>
</div>
</div>
-
<div id="slidemarginleft" style="" class="slide">
 
-
  <button>slide it</button>
 
-
  <div class="inner">Animate this element's margin-left style property</div>
 
-
</div>
 
<div style="overflow:hidden; width:730px">
<div style="overflow:hidden; width:730px">
<div style="width:1520px;" id="superwide">
<div style="width:1520px;" id="superwide">

Revision as of 23:30, 9 August 2010