I need to remove the text Private: in value.
I tried following codes, but it doesn't remove the text.
Would you please let me know how to remove it?
Existing code (created using plugin):
<form method="post" class="dwqa-content-edit-form">
<p>
<input type="text" name="question_title" value="Private: about your question" tabindex="1">
</p>
</form>
Codes I tried:
jQuery('.dwqa-content-edit-form p input').text(function () {
return jQuery(this).text().replace(/Private: /g, '');
});
jQuery('.dwqa-content-edit-form p input[type=text]').each(function() {
if (jQuery(this).val() === "Private: ") {
jQuery(this).remove();
}
});
Thank you.