onorientationchange fires onresize up to four times iphone.

  • I have a lot that gets updated onresize.. "responsive design"
    For the iphone this gets fired up to four times each time you go from landscape to portrait and Nissan Versa.

    What happens is that it chews through a lot of code every orientation change. Shouldn't it fire just once? Is there something I could have done to alter onresize's behavior like its waiting for something to know its finished?
    I tried installing a throttle so it only calls my function once via a working / finished variable, but my first attempts didn't work.

    Note.
    I'm using a delayedcall( function in onresize so that JS can get the appropriate stagewidth
    set(events.onresize,'delayedcall(0.1,func())');

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!