Team:Duke

From 2009.igem.org

(Difference between revisions)
Line 24: Line 24:
  <script type="text/javascript">
  <script type="text/javascript">
$(document).ready(function() {
$(document).ready(function() {
-
   $('div.demo-show:eq(0)> div').hide();
+
// hides the slickbox as soon as the DOM is ready
-
   $('div.demo-show:eq(0)> h3').click(function() {
+
// (a little sooner than page load)
-
  $(this).next().slideToggle('fast');
+
   $('#slickbox').hide();
 +
// shows the slickbox on clicking the noted link
 +
  $('a#slick-show').click(function() {
 +
$('#slickbox').show('slow');
 +
return false;
 +
  });
 +
// hides the slickbox on clicking the noted link
 +
   $('a#slick-hide').click(function() {
 +
  $('#slickbox').hide('fast');
 +
return false;
 +
  });
 +
// toggles the slickbox on clicking the noted link
 +
  $('a#slick-toggle').click(function() {
 +
$('#slickbox').toggle(400);
 +
return false;
   });
   });
});
});
Line 32: Line 46:
</head>
</head>
-
<div class="demo-show">
+
<a onclick="#slick-show">toggle box</a>
-
  <h3>Title 1</h3>
+
 
-
  <div>testing one</div>
+
<div id="slickbox">
-
  <h3>Title 2</h3>
+
blahblahblah
-
  <div>hidar</div>
+
-
  <h3>Title 3</h3>
+
-
  <div>CYD</div>
+
</div>
</div>

Revision as of 04:12, 22 September 2009

toggle box

blahblahblah


Under Construction