Team:UNITN-Trento/JS/Team

From 2013.igem.org

(Difference between revisions)
Line 1: Line 1:
$(document).ready(function() {
$(document).ready(function() {
$( '#jms-slideshow' ).jmslideshow();
$( '#jms-slideshow' ).jmslideshow();
 +
 +
$img = $('#jms-slideshow .image img')
 +
alt = $img.attr('data-alt');
 +
src = $img.attr('src');
 +
$img.fadeOut('fast', function() {
 +
$img.attr('src',alt);
 +
$img.fadeIn();
 +
})
 +
$img.attr('data-alt',src);
});
});

Revision as of 12:23, 12 August 2013

$(document).ready(function() { $( '#jms-slideshow' ).jmslideshow();

$img = $('#jms-slideshow .image img') alt = $img.attr('data-alt'); src = $img.attr('src'); $img.fadeOut('fast', function() { $img.attr('src',alt); $img.fadeIn(); }) $img.attr('data-alt',src); });