Skip to content

Instantly share code, notes, and snippets.

@TommyZG
Created February 4, 2018 14:56
Show Gist options
  • Save TommyZG/000773fb9c1b377c120bae9048ebbec4 to your computer and use it in GitHub Desktop.
Save TommyZG/000773fb9c1b377c120bae9048ebbec4 to your computer and use it in GitHub Desktop.
fadeIn and fadeOut with jQuery
// fadeIn
$('.selection').css({opacity: 0.0, visibility: "visible"}).animate({opacity: 1.0});
// fadeOut
$('.selection').css({opacity: 1.0, visibility: "visible"}).animate({opacity: 0});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment