Team:UNITN-Trento/JS/Laboratory/Meetings

From 2013.igem.org

(Difference between revisions)
(Created page with "$(document).ready(function() { $('#photo a').each(function() { $(this).click(function(e) { e.preventDefault(); div = $('<div/>'); ...")
 
(3 intermediate revisions not shown)
Line 1: Line 1:
$(document).ready(function() {
$(document).ready(function() {
-
     $('#photo a').each(function() {
+
     $('.photo a').each(function() {
 +
        $(this).click(function(e) {
 +
            e.preventDefault();
 +
 
 +
            div = $('<div/>');
 +
            $(div).addClass('tn-hoverTag');
 +
 
 +
            // $(div).append('<span class="title">' + $(_self).html() + '</span><br/>');
 +
            $(div).append('<img src="' + $(this).children("img").attr('src') + '" />');
 +
            $(div).append('<br/><span class="msg">Click to exit</span>');
 +
            $(div).children().wrapAll('<div/>');
 +
 
 +
            $(div).click(function(e) {
 +
                e.preventDefault();
 +
                $(div).remove();
 +
                $('#tn-content .tag').removeClass('active');
 +
            });
 +
            $('body').append(div);
 +
        });
 +
    });
 +
 
 +
    $('.logo a').each(function() {
         $(this).click(function(e) {
         $(this).click(function(e) {
             e.preventDefault();
             e.preventDefault();

Latest revision as of 08:35, 25 September 2013

$(document).ready(function() {

   $('.photo 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);
       });
   });
   $('.logo 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);
       });
   });
   

});