title: How can I set current typed characters manually on bootstrap maxlength?
body: <p><a href="https://jsfiddle.net/0tx58ma1/6/" rel="nofollow noreferrer">https://jsfiddle.net/0tx58ma1/6/</a></p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>(function($){
    $('[maxlength]').maxlength({
      alwaysShow: true,
      separator: ' / ',
      preText: '',
      postText: '',
      showMaxLength: true,
      showCharsTyped: true,
      placement: 'bottom-right-inside',
      showOnReady: true,
    });
  
    $("#btnReplaceText").click(function(){
      $("#test").val("ypaaaa");
      $("#text").show();
    });
  })(jQuery);</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/5.0.0-alpha1/js/bootstrap.min.js"&gt;&lt;/script&gt;
  &lt;script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-maxlength/1.10.0/bootstrap-maxlength.min.js"&gt;&lt;/script&gt;
  &lt;input type="text" id="test" maxlength="10" placeholder="please click button" value=""&gt;
  &lt;br&gt;
  &lt;button type="button" id="btnReplaceText"&gt;click me&lt;/button&gt;
  &lt;p id="text" style="display: none;"&gt;I wanna set current typed characters when I push button. How can I ???&lt;/p&gt;</code></pre>
  </div>
  </div>
  </p>
  <p>This plugin counts the number of characters currently typed in real time.</p>
  <p>If you are typing with a keyboard, it will count the number of characters as you expect.</p>
  <p>However, if you substitute a string with a click event using jQuery, it will not count the number of characters because it is not typing.</p>
  <p>I would like the current character count to appear in the character counters when the button is clicked.</p>
  <p>I wanna set current typed characters when I push button. How can I ???</p>