window resize event jquery toggle code example Example: jquery window trigger resize window.dispatchEvent(new Event('resize'));