Team:ETH Zurich/js/slide hidden content.js

From 2014.igem.org

(Difference between revisions)
(Created page with "$(document).ready(function() { $("#button").toggle(function() { $(this).text('Hide Content'); }, function() { $(this).text('show Content'); }).click(f...")
Line 1: Line 1:
-
$(document).ready(function() {
+
$(".toggle").slideUp();
-
    $("#button").toggle(function() {
+
$(".trigger").click(function(){
-
        $(this).text('Hide Content');
+
    $(this).next(".toggle").slideToggle("slow");
-
    }, function() {
+
  });
-
        $(this).text('show Content');
+
-
    }).click(function(){
+
-
        $("#hidden_content").slideToggle("fast");
+
-
        $("#hide_content").slideToggle("fast");
+
-
    });
+
-
});
+

Revision as of 21:01, 13 June 2014

$(".toggle").slideUp(); $(".trigger").click(function(){

   $(this).next(".toggle").slideToggle("slow");
 });