New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When content of parallax expands the height of the mirror does not expand smoothly #39
Comments
jQuery(window).trigger('resize').trigger('scroll'); |
Hi Mike, Thanks for your quick reply. However it did not help, I am currently doing the below: $(this).prev('div.wrap-infos').slideToggle(function(){
window.dispatchEvent(new Event('resize'));
}); Which works but the height is only changed after the divs have increased in size and so doesn't flow with the toggle slide. Thanks |
Ah, I see. Unfortunately there is no simple way of achieving what you want. The plugin's 'resize' hook was meant to cover a content refresh in a single frame (e.g. when the user resizes the browser window or in response to a single, layout-changing DOM manipulation). You could try to create a manual 'step' method for jQuery.animate() and place the trigger there, but I worry it would have pretty poor performance on older browsers since it would be recalculating every parallax element at every frame of the animation. Let me know how it works for you if you decide to give it a try... |
closed antiquated issue for cleanup. if this is still rellevant, feel free to reopen. |
I have a parallax with divs inside that use slideToggle.
I am mimicing the window being resized to trigger a refresh of the parallax height.
The height of the parallax changes but no way of making it smooth as it is triggered after the slideToggle has completed.
Thanks
The text was updated successfully, but these errors were encountered: