I am auto populating text in a text area based on a value selected from a ddl.
Now I can get the text to appear, but I would like that text to be bold.
I have this:
$(document).ready(function () { $('#activityID').change(function () { var selectedActivity = this.options[this.selectedIndex].parentNode.label; var text = "Event Name: \nEvent Location: \nEstimated # of Participants:" var result = text.bold(); if (selectedActivity === "DEMONSTRATIONS") { $('#Summary').val(result); } else if (selectedActivity !== "DEMONSTRATIONS") { $('#Summary').val(""); } }); }); In the TextArea it is rendering as:
<B>Event Name: Event Location: Estimated # of Participants:</B> Is there any possible way to get this text to render as bold when that specific item is chosen from the DDL?
I have referenced this but this did the same thing as above.
Any help is appreciated.
string.bold()is deprecated and shouldn't be used. See: developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/…