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

164
Visualizações
How to add css langage style with javascrit for lang(en)::before / lang(fr)::before

Is there a way to do this css code with javascript langage or jquery and have the same result? I don't find any sample for this.

#readonlyEmail_label:lang(fr)::before{
    content: 'Adresse courriel vérifiée. Vous pouvez continuer.';
    font-family: 'Open Sans', sans-serif;
    font-weight: bold;
    font-size: 14px;
    width:650px;
    padding-bottom: 24px;
    display: block;
}
#readonlyEmail_label:lang(en)::before{
    content: 'Email address verified. You can now continue.';
    font-family: 'Open Sans', sans-serif;
    font-weight: bold;
    font-size: 14px;
    width:650px;
    padding-bottom: 24px;
    display: block;
}

Thanks

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

This can be done by editing the document stylesheet from JavaScript, like so:

const lang = {
  fr: {
    text: `content: 'Adresse courriel vérifiée. Vous pouvez continuer.'`,
    color: `color: #F00`
  },
  en: {
    text: `content: 'Email address verified. You can now continue.'`,
    color: `color: #0F0`
  }
};

const css = document.styleSheets[0];

css.addRule('.readonlyEmail_label:lang(fr)::before', lang.fr.text);
css.addRule('.readonlyEmail_label:lang(fr)::before', lang.fr.color);
css.addRule('.readonlyEmail_label:lang(en)::before', lang.en.text);
css.addRule('.readonlyEmail_label:lang(en)::before', lang.en.color);
.readonlyEmail_label:lang(fr)::before {}
.readonlyEmail_label:lang(en)::before {}
<div class="readonlyEmail_label" lang="en"><q>This English quote has a <q>nested</q> quote inside.</q></div>
<div class="readonlyEmail_label" lang="fr"><q>This French quote has a <q>nested</q> quote inside.</q></div>

about 4 years ago · Juan Pablo Isaza Relatório
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