fix hasClass for multiple element