You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Log the element that was clicked on using a callback.
Console.log the content of the the p element with id of content.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="index.css" rel="stylesheet" type="text/css" />
<script defer src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity_no="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g=" crossorigin="anonymous"></script>
<script defer src="index.js"></script>
</head>
<body>
<p id="content">Get this content</p>
</body>
</html>
Use setTimeout, setInterval, and cancelTimeout to animate an HTML element.
Using setInterval(), make the background of the paragraph change colors.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>repl.it</title>
<link href="index.css" rel="stylesheet" type="text/css" />
<script defer src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity_no="sha256-k2WSCIexGzOj3Euiig+TlR8gA0EmPjuc79OEeY5L45g=" crossorigin="anonymous"></script>
<script defer src="index.js"></script>
</head>
<body>
<div><span id="colorChanger">This paragraph changes colors!</span></div>
</body>
</html>