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

120
Visualizações
jQuery Font Colour Change

Hi I am trying to adjust the below code to add a colour change

The line in question is: $("tfa_2287-HTML").css('color', 'white');

I would like to change the colour if criteria is met

Any thoughts on what is wrong?

This code was achieve thanks to the below document:

https://docs.google.com/document/d/1PQNbJbdMYlY7X3q_pVwrJqAgB2XsGiS1ZZTUMRHTaGI/edit#

<script src=https://code.jquery.com/jquery-1.9.1.min.js></script>
<script>
  
$(document).ready(function() {
  //the id here should be for the FIELD on the form
  //this line is listening for a change to the field in order to execute the code
  $("#tfa_466").change(function(){
  
  //the id here should be for the CHOICE on the form
  //":selected" is used for dropdowns, use ":checked" for radio and checkbox fields
  if($("#tfa_467").is(":selected") &&
     $("#tfa_589").is(":Checked") ||
     $("#tfa_590").is(":Checked")) {  
  
    //primaryAction is the element name for the submit button
    //this will SHOW the submit button if the criteria above is met
    $(".wfPageNextButton").show();
              $("#tfa_2287").hide();
                $("#tfa_2287-HTML").css('color', 'white');

    }

  else {
    //this will HIDE the submit button if the criteria above is not met
    $(".wfPageNextButton").hide();
    $("#tfa_2287").show();
  }
  });
});

</script>

UPDATE: since amending the typo, it does recognise the code just for some reason it doesn’t change colour

<div class="htmlContent" id="tfa_2287-HTML" style="color: blue;"><b></b><b>Please note you do not meet the criteria</b><p></p></div>
about 4 years ago · Santiago Gelvez
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