Skip to content

Instantly share code, notes, and snippets.

@sczizzo
Created December 12, 2011 16:29
Show Gist options
  • Save sczizzo/1468098 to your computer and use it in GitHub Desktop.
Save sczizzo/1468098 to your computer and use it in GitHub Desktop.
Turn a site with jQuery into a strobe light
function swap() {
if ($(window).data('on') === undefined) {
$('body').remove();
$('html').css('background', 'white');
$(window).data('on', false);
}
if ($(window).data('on')) {
$('html').css('background', 'black');
$(window).data('on', false);
} else {
$('html').css('background', 'white');
$(window).data('on', true);
}
setTimeout('swap()', 25);
}
swap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment