Class for javascript