JSFiddle - React, Tailwind, and code Playground
by Ian Roberts
JavaScript
//how to remove click event jquery
<script>
$(document).ready(function() {
$('body').fadeIn(1000);
$('#page a').click(function(event) {
event.preventDefault();
newLocation = this.href;
$('body').fadeOut(600, newpage);
});
function newpage() {
window.location = newLocation;
}
// remove click events here to add them again below
$('.scrollup, .ccm-button-v2').unbind('click');
// end removed click events
// scroll jq
$(window).scroll(function(){
if ($(this).scrollTop() > 100) {
$('.scrollup').fadeIn();
} else {
$('.scrollup').fadeOut();
}
});
$('.scrollup').click(function(){
$("html, body").animate({ scrollTop: 0 }, 600);
return false;
});
});</script>