Some image gallery libraries (namely FlexSlider) clone the first and the last image to make consistent scrolling possible.
Since it's a deep clone (with the wrapped <div> and <img>) this should be possible in theory. However, right after the clone the init() kicks in and the script breaks. For now I hacked the script with a early return when the background-image div has childs (and therefor must have been polyfilled already).
I was unable to create a cleaner solution. You might want to look into it.
Some image gallery libraries (namely FlexSlider) clone the first and the last image to make consistent scrolling possible.
Since it's a deep clone (with the wrapped
<div>
and<img>
) this should be possible in theory. However, right after the clone theinit()
kicks in and the script breaks. For now I hacked the script with a early return when the background-image div has childs (and therefor must have been polyfilled already).I was unable to create a cleaner solution. You might want to look into it.
Thanks for the great work!