Even if the attribute does not exist? 
I try this in Aloha-editorAloha.jQuery('<div class=""></div>').attr('class') and it returns undefined. Could be jQuery version?