1

I want to get the text bold and underline and want to change some text to red color I am trying like the below code but still not changing anything

<script src="/../IT/SiteAssets/jquery.min.js"></script>
  <script type="text/javascript">
  $(function() {
   if($(this).html() == ("1.  This online survey is used to find out how many staff will be interested to attend the Onsite Health Screening"))
{
  ($(this)).html("Yes, I would like to attend the FREE Onsite Basic Health Screening at <U><B> JI Site Office on 16 August 2016 </B></U> (please proceed to Q2)");
}
});
</script>
1

You should use bold tag in html text see example below:

$(this).html("Yes, I would like to attend the FREE Onsite Basic Health Screening at  <b>JI Site Office on 16 August 2016 </b>  (please proceed to Q2)")
  • I tried like this only it dint reflect... is there any solution for this ? – sai Jul 5 '16 at 8:54
  • it should work, i have tried and tested it. What is this in your case, is that an element – Ravindra Jul 5 '16 at 9:19
  • $(this).css("color","red"); – Ankit Kumar Jul 5 '16 at 11:29
  • Hi @AnkitKumar $(this).css("color","red"); this is not reflecting is there any method to approach – sai Jul 7 '16 at 1:38
  • I want to change only "please procced to Q2" to red – sai Jul 7 '16 at 1:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.