You are missing your closing });
.
You also had two $(document).ready()
calls – $(function() {})
is just short hand.
Best to invest in a auto formatter and/or run your code through a linter when in doubt – checkout this repo for some karma+grunt magic – https://github.com/karma-runner/grunt-karma.
1
solved What’s wrong with the Javascript code? [closed]