what it does:
$(\'p\').addClass(\'bar\');
output:
<
This should not be a dependency for you in any way at all because of the limited control you have over the className string, but you can do this:
className
$("p").removeClass('foo').addClass('bar foo');