Is there a syntax for getting the class name by id. The class name is dynamic so I can't use
if(Dom.hasClass('id-name-here', 'class-name-here')
{
Dom.removeClass('id-name-here', 'class-name-here');
Dom.addClass('id-name-here', 'class-name-here');
}
I can get the src attribute using the id by doing this,
Dom.get('id-name-here').src
But when I try to adapt it to class, it is undefined
Dom.get('id-name-he开发者_StackOverflow中文版re').class
I am only certain of the id. Can you point me to the right documentation or teach me how...Thank you!
I think, it is className
rather than class
:
Dom.get('id-name-here').className;
精彩评论