Forums Forums Search & Filter Pro Updating other JS after filtering

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #98562

    Hi,

    I am using the matchheight js library to display my posts in a grid, but after filtering the heights are lost.

    I assume I need to call…

    $.fn.matchHeight._update()

    … to trigger an update after the filtering is complete. How can I achieve this? Is there a JS API function I can use?

    You can see the behaviour here – https://careleaverpp.org/resources (filter using the bottom option – websites).

    Thanks in advance,

    Tony.

    Trevor
    #98667

    If you are doing a page refresh then you would need to add javascript to the page, like this:

    (function ( $ ) {
     "use strict";
     $(document).on("sf:ajaxfinish", ".searchandfilter", function(){
      console.log("ajax complete");
      // your js here
     });
    }(jQuery));
    Anonymous
    #98693

    Perfect. Thank you!

Viewing 3 posts - 1 through 3 (of 3 total)