fixing js written type element target