Unable to create snippet - Network error: JSON.parse
Problem to Solve
There is an error when trying to create a Snippet:
Can't create snippet: Error: Network error: JSON.parse: unexpected character at line 1 column 1 of the JSON data
This can be seen in this video: https://drive.google.com/file/d/1bNZJ10sXVkOB_KLANwO3DgzTSDOUaj9s/view?usp=sharing
Files used in the Snippet:
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8">
<title>A Simple Example</title>
<meta http-equiv="Content-Language" content="en-US" >
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1>I am a headline made with HTML</h1>
<p>And I am a simple text paragraph. The color of this text is styled with CSS. Click the button below to remove me through the power JavaScript.</p>
<button>Hide the text above</button>
<script src="scripts.js"></script>
</body>
</html>
body {
font-family: sans-serif;
text-align: center;
padding: 3rem;
font-size: 1.125rem;
line-height: 1.5;
transition: all 725ms ease-in-out;
}
h1 {
font-size: 2rem;
font-weight: bolder;
margin-bottom: 1rem;
}
p {
margin-bottom: 1rem;
color: tomato;
}
button {
cursor: pointer;
appearance: none;
border-radius: 4px;
font-size: 1.25rem;
padding: 0.75rem 1rem;
border: 1px solid navy;
background-color: dodgerblue;
color: white;
}
$('button').on('click', function() {
$('p').css('opacity', 0);
});