Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

176
Visualizações
How can I sort a directory style page's content into groups without repeating code?

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!

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda