else if (element.className) {// a b c => .a.b.c return "." + element.className.split(' ').filter(item => !!item).join('.');