Мой код следующий (также доступен на jsfiddle ):
$button = $('<button />', {
text: 'my button',
class: 'button'
});
Сообщение об ошибке jslint:
Problem at line 3 character 5: Expected an identifier and instead saw 'class' (a reserved word).
class: 'button'