possible to include orientation change? #14

Closed
nosarious opened this Issue Nov 5, 2011 · 2 comments

Projects

None yet

3 participants

@nosarious

I noticed this plugin relies on $(window).resize to do it's magic.

Unfortunately this does not seem to work properly with iPad orientation change.

I have a resizing script on my site which recalculates several sizes for divs to centre images. This is called with several options:

jQuery.event.add(window, "orientationchange", reCalculateFunction);
jQuery.event.add(window, "load", reCalculateFunction);
jQuery.event.add(window, "resize", reCalculateFunction);

and if I include a fittext call within this function, it will now update properly on orientation change.

I'm not sure if this system will add to a memory leak or not, but having a way for your plugin to include $(window).orientationchange or the equivalent would be very, very nice.

(note, adding this to the fittest plugin does not work, since query $(window) does not have an orientation change event handler thingie.)

Gerry.

@alistairtweedie

Hi Gerry,

This may solve a problem I've having but trying to understand where exactly to put this is the doc to get it to work. Any help would be great.

Thanks

@davatron5000

I can probably work this in. Will do in the near future.

This was referenced Oct 27, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment