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

From 2014.igem.org

(Difference between revisions)
 
(One intermediate revision not shown)
Line 1: Line 1:
-
$(".toggle").slideUp(0);
+
$(".hide_toggle").slideUp(0);
$(".trigger").toggle(function() {
$(".trigger").toggle(function() {
         $(this).text('Show less');
         $(this).text('Show less');
Line 5: Line 5:
         $(this).text('Show more');
         $(this).text('Show more');
     }).click(function(){
     }).click(function(){
-
     $(this).prev(".toggle").animate({
+
     $(this).prev(".hide_toggle").animate({
             height: "toggle",
             height: "toggle",
             opacity: "toggle"
             opacity: "toggle"
         }, "slow");
         }, "slow");
   });
   });

Latest revision as of 23:08, 13 June 2014

$(".hide_toggle").slideUp(0); $(".trigger").toggle(function() {

       $(this).text('Show less');
   }, function() {
       $(this).text('Show more');
   }).click(function(){
   $(this).prev(".hide_toggle").animate({
           height: "toggle",
           opacity: "toggle"
       }, "slow");
 });