added window bind event to logic js