-
-
Save nocodesupplyco/672d6fbad00ed8e74692dd1dd2c1e8c8 to your computer and use it in GitHub Desktop.
Inline Merge and Nest Collection Lists
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
$(function () { | |
for (var i = 0; i < $(".tr-wrap .tr-category").length; i++) { | |
var name = $(".tr-wrap .tr-category").eq(i); | |
for (var d = 0; d < $(".tr-title").length; d++) { | |
var title = $(".tr-title").eq(d); | |
if (title.text() == name.text()) { | |
var parent = name.closest(".tr-item"); | |
var titleContain = title.closest(".tr-contain").find(".tr-list"); | |
parent.clone(true, true).appendTo(titleContain); | |
} | |
} | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment