Triggering a window resize on click?
Hi guys - I've found a bug in a framework I'm using. Basically a certain module won't work until you've resized your window. I don't know why that is, but I can think of an obvious fix: make the window resize when the module needs to be used.
I've had a go at this, and it's not working. Here's the jquery I've tried:
- $(".range-slider-handle").click(function) {
- $(window).trigger('resize');
- });
That's sitting on it's own in a .js file.
The html markup of the module is like this:
- <div class="range-slider" data-slider>
- <span class="range-slider-handle"></span>
- <span class="range-slider-active-segment"></span>
- <input type="hidden">
- </div>
I want it to be that as soon as a user touches the slider handle the window resizes, fixing the slider functionality.
Any help really appreciated. Thanks!