I've got a page using Cycle2 to run a slideshow with a hide show element to it.
It's all working great, except when I expand the slide and close it again, the height goes off. If I slightly resize the window, this will trigger the recalculation and then the space from the height gets put back right.
I'm using
data-cycle-auto-height="container"
I basically just need to trigger this action that happens on a resize.
Any tips?
The cheat way to do it would be to assign a listener to your plugin's open/close events that triggers a window resize.
$(window).on('your_event_name', function() {
$(this).resize();
});
If you've got the time though, you should dig in a little deeper and figure out what's actually happening. Ideally, your plugin would handle this stuff on it's own.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With