get last selector name (and class or id, if it exists)