Skip to content

Instantly share code, notes, and snippets.

@StefanoChiodino
Created September 4, 2017 08:06
Show Gist options
  • Save StefanoChiodino/d9045b51003b5f275c0c633ffd015d7e to your computer and use it in GitHub Desktop.
Save StefanoChiodino/d9045b51003b5f275c0c633ffd015d7e to your computer and use it in GitHub Desktop.
Bring your website back in time
var transitionSeconds = 5;
$('<style>').html('* { transition: all ' + transitionSeconds + 's; }').appendTo(document.body)
$(document.body).find('*').each((index, element) => {
$(element).data('id', $(element).attr('id'));
$(element).data('class', $(element).attr('class'));
$(element).removeAttr('class id');
});
setTimeout(function() {
$(document.body).find('*').each((index, element) => {
$(element).attr('id', $(element).data('id'));
$(element).attr('class', $(element).data('class'));
});
}
, transitionSeconds * 1000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment