Difference between revisions of "Template:Groningen"

Line 50: Line 50:
 
<a href="/Team:Groningen/Applications">Applications</a>
 
<a href="/Team:Groningen/Applications">Applications</a>
 
<a href="/Team:Groningen/FuturePerspectives">Future Perspectives</a>
 
<a href="/Team:Groningen/FuturePerspectives">Future Perspectives</a>
 +
<a href="/Team:Groningen/Notebook">Notebook</a>
 
</div>
 
</div>
 
</div>
 
</div>
Line 348: Line 349:
 
function cycleImages(idx, cyc){
 
function cycleImages(idx, cyc){
 
cyc = $(cyc);
 
cyc = $(cyc);
 +
 +
if(!cyc.data('done')){
 +
return;
 +
}
 
 
 
var imgs = cyc.find('img:not(.base)'),
 
var imgs = cyc.find('img:not(.base)'),
Line 370: Line 375:
 
cycs.each(function(idx, cyc){
 
cycs.each(function(idx, cyc){
 
cyc = $(cyc);
 
cyc = $(cyc);
 +
cyc.data('done', false);
 +
var imgs = cyc.find('img'),
 +
base = imgs.filter('.base'),
 +
backlog = imgs.length;
 
 
cyc.find('img.base').removeClass('active').clone().prependTo(cyc).css('visibility', 'hidden');
+
base.removeClass('active').clone().prependTo(cyc).css('visibility', 'hidden');
cyc.find('img.base').last().removeClass('base').addClass('active');
+
base.last().removeClass('base').addClass('active');
cyc.find('img').click(function(){
+
imgs.click(function(){
 
cycleImages(0, cyc);
 
cycleImages(0, cyc);
 +
}).on('load', function(){
 +
backlog--;
 +
 +
if(!backlog){
 +
cyc.data('done', true);
 +
}
 
});
 
});
 
 

Revision as of 09:48, 18 October 2016

CryptoGE®M
Team
Project
Biology
Computing
Human Practice
Acknowledgements