Combine Two Collections (Jquery + JsFiddle)

Here is the jquery to combine two collection lists - i.e. two multi-image galleries (if you need more than 25 images in your gallery)

var combinedLists = "";
$(".collection-list-list").each(function () { 
    combinedLists += $(this).html();

$(".collection-list-list").html(combinedLists );

Here’s a jsfiddle of it in action-

1 Like

FYI: As of jQuery 3.4 , the :first pseudo-class is deprecated. Remove it from your selectors and filter the results later using .first() .

1 Like

Thanks for the heads up - just updated the code now.

1 Like