Javascript Class for a easy contentchange