-
-
Save zearadoua/9ac341cbd58d22df608ca03f4e99361f to your computer and use it in GitHub Desktop.
insert every 3 column inside a row
This file contains 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
fixColHeight = function () { | |
if ($('.page-search.page-search-node').length) { | |
var $container = $(".node-search-results"); | |
var $cols = $container.find(".row > div").detach(); | |
$container.empty(); | |
for(var i = 0; i < $cols.length; i++) { | |
if (i % 3 == 0) { | |
$container.append($("<div>").addClass("row")); | |
} | |
$container.find(".row").last().append($cols.eq(i)); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment