Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

169
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda