Skip to content

Instantly share code, notes, and snippets.

@samusgray
Last active June 7, 2016 22:15
Show Gist options
  • Save samusgray/1c71323c782664efda78 to your computer and use it in GitHub Desktop.
Save samusgray/1c71323c782664efda78 to your computer and use it in GitHub Desktop.
reveal.js subliminal messages
var images = [
'<img src="img/starbucks.png">',
'<img src="img/google.png">'
];
var flash = function(id, image) {
var target = document.getElementById(id);
var goodHTML = target.innerHTML;
target.innerHTML = image;
setTimeout(function() {
document.getElementById(id).innerHTML = goodHTML;
}, 1)
};
setInterval(function() {
flash('current', images[Math.floor(Math.random()*images.length)]);
}, 20000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment