Last active
February 18, 2021 17:48
-
-
Save FreshLondon/b79f8f3893d5c073fcf64a5da4bbc979 to your computer and use it in GitHub Desktop.
Fading screen on hyperlink click
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
(function ($) { | |
$(document).on('click', '.fading-menu a', function (event) { | |
event.preventDefault(); | |
var target = $(this).attr('href'); | |
$('body').fadeOut(function () { | |
window.location = target; | |
}); | |
}); | |
})(jQuery); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment