I have some simple javascript code that I have tested in JS Fiddle which works fine there, but when using in my dust.js template, i keep getting “unexpected token ILLEGAL” but it doesnt tell me which token is illegal. I’ve checked for extra characters already.
$(document).ready(function() {
$('.edit').keydown(function(e) {
if(e.which == 13) {
$(this).blur().next().focus();
return false;
}
});
})
Here is the jsFiddle link: http://jsfiddle.net/sxvX8/1/
There’s an extra character at the end, see below:
Remove it and that error should go away.