I have written some JavaScript code which, when run, produces the following error:
"error"
"SyntaxError: Unexpected token ILLEGAL
I don't know what does this error mean. I tried googling it but couldn't find anything useful.
Here's my code:
HTML:
$(document).ready(function(){
$('#fostering').on('click', function(){
$(this).animate({
width : 50px;
});
});
});
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<script src="https://code.jquery.com/jquery-2.1.4.js"></script>
<meta charset="utf-8">
<title> Something </title>
</head>
<body>
<div id="fostering"></div>
</body>
</html>
So,
- What's causing this error?
- How do I resolve it?