Skip to content

Instantly share code, notes, and snippets.

@Nilloc
Created November 3, 2011 16:23
Show Gist options
  • Save Nilloc/1336952 to your computer and use it in GitHub Desktop.
Save Nilloc/1336952 to your computer and use it in GitHub Desktop.
Fadeout and remove objects.
$('#glass').mousedown(function(evt){
var $thumb = $('<img src="img/thumbprint.png" class="thumbprint">')
.css({top:evt.offsetY-30, left:evt.offsetX-20, opacity:1, rotation:90}) //, "-webkit-transform": "rotate("+((Math.random()*30)-15)+" deg)"
.delay(1000)
.animate({opacity:0}, 2000, function(){$(this).remove();});
$(this).append($thumb);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment