Is there a jQuery or vanilla JS function that will group items of matching text content, without me prompting class names, elements, etc?
More specifically for this project, I need to group modules together, and I do not know how many will eventually be made. I can name them all similarly, say "Module 1 DOC, Module 1 XLSX, Module 1 PPT, Module 2 DOC, Module 2 XLSX, Module 2 PPT," etc, so it could be something like:
$("div#page").each(function(index) {
// check titles for generic matching content
if ($(this).find("h1:contains('*[words-that-match]')").length > 0) {
}
});
or [same-title] something like that? I'm not sure what the syntax would look like.
I apologize that my JS/JQ knowledge is so lacking, I am pretty new to this. Thanks in advance!