Triggering a window resize on click?

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:

  1. $(".range-slider-handle").click(function) {
  2.       $(window).trigger('resize'); 
  3.  });

That's sitting on it's own in a .js file.

The html markup of the module is like this:

  1. <div class="range-slider" data-slider>
  2.   <span class="range-slider-handle"></span>
  3.   <span class="range-slider-active-segment"></span>
  4.   <input type="hidden">
  5. </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!