Question: Can anyone explain why this syntax does not work in Safari or Internet Explorer:

```
$('#something').attr({src: src_url, class:class_name});

```

IE, "Expected indentifier, string or number". And why do they require src and class to be strings like:

```
$('#something').attr({'src': src_url, 'class': class_name});

```

Thanks

Answer: 
From the [documentation](http://api.jquery.com/attr/):

> 
> WARNING: When setting the 'class' attribute, you must always use quotes!
> 
> 
>
The `src` property should work without apostrophes, but `class` is a reserved keyword so it can't be used as an identifier, it has to be a string.