Testing my website on IE8 throws a strange error; I first thought it was due to leaving a comma after “class: ‘deflect'”, but it still complains about “Expected identifier, string or number”:
var deflector =
jQuery('<div/>', {
style: 'left: ' + x + 'px; top: ' + y + 'px',
class: 'deflector'
});
Cleared cache, no luck. What could that be?
(btw real browser don’t complain about anything 😉
classis a reserved keyword [MDN]. Use a string:At least Firefox (since FF5) will complain about this as well and with good reason.