Forums › Forums › Search & Filter Pro › Trying to edit results.php to show results in grid
- This topic has 28 replies, 3 voices, and was last updated 8 years, 4 months ago by Anonymous.
-
Trevor(Private) June 24, 2016 at 7:05 pm #49393
Hi Jason
Great to speak with you. So, you are going to contact the OP from this thread:
https://support.searchandfilter.com/forums/topic/trying-to-implement-with-animations-and-masonry/
And see if he can give you a bit of guidance. Let me know how you get on. If you manage to resolve it, also let me know if I can close the thread?
Ross Moderator(Private) June 27, 2016 at 11:15 pm #49573Anonymous(Private) August 12, 2016 at 5:59 pm #54442I got masonry working with Ajax..
After the log of ajax complete, I put the following code:$(‘#ms-container’).imagesLoaded( function() {
var container = document.querySelector(‘#ms-container’);
var msnry = new Masonry( container, {
itemSelector: ‘.ms-item’,
columnWidth: ‘.ms-item’,
isAnimated: true,
});
});#ms-container would be the container that you have your grid
.ms-item would be your item selectorI was having a problem with the results overlapping, and I figured out that everything was firing before the images were loaded.
This script makes sure that the images are loaded and then start the masonry.
-
AuthorPosts