0

Please take a look at my website and open browser console for error check: http://mayy.in/stp.html

I am looking at it in Chrome console and its giving me error:

Uncaught SyntaxError: Unexpected token ILLEGAL 

on line 44

What could be the problem? Its a very simple piece of code like this:

$('div').each("click", function() {

$(this).remove();​​​​​​​
});​
Tushar Gupta - curioustushar
  • 58,085
  • 24
  • 103
  • 107
Youss
  • 4,196
  • 12
  • 55
  • 109

1 Answers1

4

I don't think your code is correct. You can bind event on all element without iterating. through each.

I debugged your code and found there are some special characters in your code enter image description here

I was able to run code after Removing ';' .

$('div').click( function() {

$(this).remove();​​​​​​​
});​

OR

$('div').on('click', function() {

$(this).remove();​​​​​​​
});​
Anoop
  • 23,044
  • 10
  • 62
  • 76