How to stop displaying (for seconds) a removed text (wordpress)?

Viewed 52

I removed 'Private: ' in the value of the input using following code.

The problem is, it shows 'Private: ' for seconds, then disappears when loading the page.

How do I stop showing it when loading the page?

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>

jQuery to remove the text:

jQuery('.dwqa-content-edit-form p input[type=text]').each(function() {
        console.log(jQuery(this).val());
        var value = jQuery(this).val().replace("Private: ", '');
        jQuery(this).val(value);
 });
0 Answers
Related