Skip to content

Instantly share code, notes, and snippets.

@brianpetro
Created August 18, 2016 17:05
Show Gist options
  • Save brianpetro/db4a306af172ec038857191646b6557b to your computer and use it in GitHub Desktop.
Save brianpetro/db4a306af172ec038857191646b6557b to your computer and use it in GitHub Desktop.
<div style="background-color: green; width: 100px"
id="switch1">light 1</div>
<script>
var $light = $('#switch1');
setInterval(function () {
$light.toggle();
}, 1000);
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment