Team:UNITN-Trento/JS/Project/Vending Machine
From 2013.igem.org
(Difference between revisions)
Line 3: | Line 3: | ||
- | $('#jms-slideshow | + | $('#jms-slideshow a').each(function() { |
$(this).click(function(e) { | $(this).click(function(e) { | ||
e.preventDefault(); | e.preventDefault(); | ||
Line 11: | Line 11: | ||
// $(div).append('<span class="title">' + $(_self).html() + '</span><br/>'); | // $(div).append('<span class="title">' + $(_self).html() + '</span><br/>'); | ||
- | $(div).append('<img src="' + $(this).attr('src') + '" />'); | + | $(div).append('<img src="' + $(this).children("img").attr('src') + '" />'); |
$(div).append('<br/><span class="msg">Click to exit</span>'); | $(div).append('<br/><span class="msg">Click to exit</span>'); | ||
$(div).children().wrapAll('<div/>'); | $(div).children().wrapAll('<div/>'); |
Latest revision as of 16:04, 15 September 2013
$(document).ready(function() {
$('#jms-slideshow').jmslideshow();
$('#jms-slideshow a').each(function() { $(this).click(function(e) { e.preventDefault();
div = $('<div/>'); $(div).addClass('tn-hoverTag');
// $(div).append('' + $(_self).html() + '
'); $(div).append('<img src="' + $(this).children("img").attr('src') + '" />'); $(div).append('
Click to exit'); $(div).children().wrapAll('<div/>');
$(div).click(function(e) { e.preventDefault(); $(div).remove(); $('#tn-content .tag').removeClass('active'); }); $('body').append(div); }); });
});