The timeout is cleared every time a resize event fires, making sure your code is only executed once the resizing actually stopped.