How do I change the font in java? | Experience Community
Skip to main content
Solved

How do I change the font in java?

  • Jul 16, 2020 7:55 PM UTC
  • 4 replies
  • 82 views

Forum|alt.badge.img

I have the below Java code added to a multiple text entry. Is there a way for me to edit the font and size of "USD" and "%"? Ideally, i want to use 10.5px. Thanks in advance for any help.

jQuery('input[type="text"]').eq(1).before("USD");
jQuery('input[type="text"]').eq(2).before("USD");
jQuery('input[type="text"]').eq(3).after("%")

Best answer by SurajK

Hi MicheleQ ,
Yes, you can add the span tag and in that you can add the style like below or even you can simply add the

USD

tag.
jQuery('input[type="text"]').eq(1).before("USD");
jQuery('input[type="text"]').eq(2).before("USD");

View original

4 replies

Forum|alt.badge.img
  • Author
  • Jul 16, 2020 7:56 PM UTC

I have the below Java code added to a multiple text entry. Is there a way for me to edit the font and size of "USD" and "%"? Ideally, i want to use 10.5px. Thanks in advance for any help.

jQuery('input[type="text"]').eq(1).before("USD");
jQuery('input[type="text"]').eq(2).before("USD");
jQuery('input[type="text"]').eq(3).after("%")


SurajK
QPN Level 3 ●●●
Forum|alt.badge.img+4
  • QPN Level 3 ●●●
  • Answer
  • Jul 16, 2020 8:01 PM UTC

Hi MicheleQ ,
Yes, you can add the span tag and in that you can add the style like below or even you can simply add the

USD

tag.
jQuery('input[type="text"]').eq(1).before("USD");
jQuery('input[type="text"]').eq(2).before("USD");


Forum|alt.badge.img
  • Author
  • Jul 16, 2020 8:13 PM UTC

SurajK , thank you so much for the quick response!


rondev
Level 6 ●●●●●●
Forum|alt.badge.img+22
  • Level 6 ●●●●●●
  • Jul 16, 2020 8:18 PM UTC

You can update the code as below:
jQuery('input[type="text"]').eq(1).before("

USD

");