Difference between revisions of "Template:UFMG Brazil/wikijs"

(Created page with " var pttr = ".image, .text, .mouth, .sub-text"; window.ref = []; var uid = 0;$('.image').each(function(){ uid++; window.ref[uid] = 0; $(this).data('u...")
 
m (Denisoliveirac moved page Team:UFMG Brazil/wikijs to Template:UFMG Brazil/wikijs)
(No difference)

Revision as of 11:27, 17 September 2015

var pttr = ".image, .text, .mouth, .sub-text"; window.ref = []; var uid = 0;$('.image').each(function(){ uid++; window.ref[uid] = 0; $(this).data('uid',uid); }); $('.text, .mouth, .sub-text').each(function(){ $(this).data('uid',$(this).parent().children('.image').data('uid'));}); $(pttr).mouseenter(function(){ var uid = $(this).data('uid'); window.ref[uid] = window.ref[uid] + 1; if (window.ref[uid] == 1) { var parent = $(this).parent(); var macr = parent.children('.macr'); macr.removeClass('hide').addClass('image-macr animated fadeInUp'); parent.children('.mouth').addClass('animated fadeInDown').removeClass('hide'); parent.children('.sub-text').addClass('animated fadeIn').removeClass('hide'); } }); var setTimeoutConst; $(pttr).mouseleave(function(){ var uid = $(this).data('uid'); window.ref[uid] = window.ref[uid] - 1; var that = $(this); setTimeoutConst = setTimeout(function(){ if (window.ref[uid] == 0) { that.parent().children('.mouth').removeClass('animated fadeInDown').addClass('hide'); that.parent().children('.macr').addClass('hide').removeClass('image-macr animated fadeInUp'); that.parent().children('.sub-text').addClass('hide').removeClass('animated fadeIn') }

        		}, 50);

});