Search code examples
javascriptcssinternet-explorer-8caroufredsel

resize event triggers only when manually resizing browser window on ie8


I'm editing some legacy code and we use CarouFredSel plugin here - http://docs.dev7studios.com/jquery-plugins/caroufredsel and so i got myself into this strange problem - in ie8 plugin items initializes in some misaligned position.

When i manually resize the window everything realigns perfectly. But i can't find any solution with javascript.

What i tried so far - $(window).resize(), $(document).resize(), then manually adjusting some elements - html or body .css('width', '99%') and so on. Nothing works yet except manual browser resizing.

I think the solution might be in the source of the plugin, but i got no such force to find it.


Solution

  • Okay, i finally found that this function does exactly what i've needed - carousel.trigger('updateSizes'); (when initialising a plugin you have to assign it to a variable, in my case it's carousel)

    it recalculates the dimensions of carousel, strange thing that it does not trigger when i've tried all the previous options!