Created
March 30, 2019 20:58
-
-
Save TrywaR/9e633d23eee20917f03521eeafc22179 to your computer and use it in GitHub Desktop.
Адаптивная сетка для результатов mFilter2 в modx с помощью masonry
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://docs.modx.pro/komponentyi/msearch2/snippetyi/mfilter2 | |
// https://masonry.desandro.com/methods.html | |
$('#mse2_results').masonry({ | |
// options | |
itemSelector: '.item4', | |
singleMode: false, | |
percentPosition: true, | |
horizontalOrder: true | |
}) | |
$(document).on('mse2_load', function(e, data) { | |
$('#mse2_results').masonry('destroy') | |
$('#mse2_results').append( data.data.results ) | |
$('#mse2_results').masonry({ | |
// options | |
itemSelector: '.item4', | |
singleMode: false, | |
percentPosition: true, | |
horizontalOrder: true | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment