Changing hasClass to include any tag name property