I need to make some part of text bold while displaying in jquery:
$(':checked').each(function() {
var $textarea = $('textarea');
$textarea.val($textarea.val() + $(this).prop('name') + ' = ' + this.value + '\n' );
});
In the above code, i want to make $(this).prop(‘name’) as bold while displaying it in textarea .
Please give me any suggestion/help
Thank you in advance
Ramsai
Text inside a textarea can’t be bold, as far as i know, because making text bold requires markup and the textarea is not processed (unless you use a WYSIWYG plugin like Tiny MCE).
You could do something like stackoverflow which has a preview panel where text is previewed with markup