just for my information, resize is trigerred on orientation change ? then why not used the orientationchange event ? (cf https://developer.mozilla.org/en-US/docs/Mozilla_event_reference/orientationchange)