Team:UNITN-Trento/JS/Team

From 2013.igem.org

(Difference between revisions)
Line 5: Line 5:
alt = $img.attr('data-alt');
alt = $img.attr('data-alt');
src = $img.attr('src');
src = $img.attr('src');
 +
alert(1);
$img.fadeOut('fast', function() {
$img.fadeOut('fast', function() {
$img.attr('src',alt);
$img.attr('src',alt);
$img.attr('data-alt',src);
$img.attr('data-alt',src);
$img.fadeIn();
$img.fadeIn();
 +
alert(2);
});
});
 +
alert(3);
});
});

Revision as of 12:26, 12 August 2013

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

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