Added check for _.debounce or $.debounce to debounce the resize method.