Biomod/2011/IITM/AcidArtists
From OpenWetWare
(Difference between revisions)
| Line 171: | Line 171: | ||
var closespeed = 300; | var closespeed = 300; | ||
$('.stack>img').toggle(function(){ | $('.stack>img').toggle(function(){ | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
//reverse above | //reverse above | ||
var $el=$(this); | var $el=$(this); | ||
| Line 188: | Line 176: | ||
$el.next().find('li a>img').animate({width: '50px', marginLeft: '0'}, closespeed); | $el.next().find('li a>img').animate({width: '50px', marginLeft: '0'}, closespeed); | ||
$el.animate({paddingTop: '35'}); | $el.animate({paddingTop: '35'}); | ||
| - | }) | + | },function(){ |
| - | + | ||
| - | + | ||
$('.stack li a').hover(function(){ | $('.stack li a').hover(function(){ | ||
$("img",this).animate({width: '56px'}, 100); | $("img",this).animate({width: '56px'}, 100); | ||
| Line 197: | Line 183: | ||
$("img",this).animate({width: '50px'}, 100); | $("img",this).animate({width: '50px'}, 100); | ||
$("span",this).animate({marginRight: '0'}); | $("span",this).animate({marginRight: '0'}); | ||
| - | }); | + | }); function(){ |
| + | var vertical = 0; | ||
| + | var horizontal = 0; | ||
| + | var $el=$(this); | ||
| + | $el.next().children().each(function(){ | ||
| + | $(this).animate({top: '-' + vertical + 'px', left: horizontal + 'px'}, openspeed); | ||
| + | vertical = vertical + 55; | ||
| + | horizontal = (horizontal+.75)*2; | ||
| + | }); | ||
| + | $el.next().animate({top: '-50px', left: '10px'}, openspeed).addClass('openStack') | ||
| + | .find('li a>img').animate({width: '50px', marginLeft: '9px'}, openspeed); | ||
| + | $el.animate({paddingTop: '0'}); | ||
| + | } | ||
}); | }); | ||
Revision as of 17:27, 2 November 2011










