In an effort to explain what I'm doing, these are FC directories:
https://roryrps.tumblr.com/fcd
https://herorps.tumblr.com/fcd
https://angeldustmt.tumblr.com/femaledirectory
In these directories you can click a descriptive option in the sidebar to sort people by things such as age, race, hair color, etc. When you choose one or multiple sorting options, the people fitting that description are narrowed down.
I'm looking to do something similar to this, but instead of the descriptive sorting options used in these directories, I'd use people's names. Clicking a name would make other people in their specified group appear.
What makes this difficult is that I would have to reenter the same information repeatedly, only in different orders. I'm looking for a way to simplify this.
For example, say we have people named Adam, Cassie, and Frank. There will be other people, but these three all belong to the same group (and others.)
Each of them will have their names listed in the sidebar as a clickable option. I would have to enter code for Adam listing that he's grouped with Cassie and Frank. Then I'd have to enter code for Cassie listing that she's grouped with Adam and Frank… Then I'd have to do the equivalent again with Frank.
Old code example:
<div class="box claire frank" data-title=""><a title="Adam"</a>
<div class="box adam frank" data-title=""><a title="Claire"</a>
<div class="box adam claire" data-title=""><a title="Frank"</a>
I'm looking for a way that I can group these together without having to enter the information more than once.
Is there any code that would make this possible?
My guess was that this might be accomplished with JavaScript, but I'm brand new to coding so I'm not even positive what language should be used. (I also don't even know what tags to use on this post. Heh.)
Thanks in advance for any help and suggestions!