Skip to content

Instantly share code, notes, and snippets.

@curtis1000
Last active December 28, 2015 02:09
Show Gist options
  • Save curtis1000/7425486 to your computer and use it in GitHub Desktop.
Save curtis1000/7425486 to your computer and use it in GitHub Desktop.
The Debugger Statement
<!DOCTYPE html>
<html>
<head>
<title>The JS Debugger</title>
</head>
<body>
<h1>JS Debugger</h1>
<p>You must have your browser's web inspector open in order to see debugger breakpoints.</p>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
$(document).ready(function() {
var colors = ['red','lightblue','yellowgreen','turquoise'];
for (var i=0; i < colors.length; i++) {
debugger;
$('body').css({"background-color": colors[i]});
}
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment