javascript - jquery not firing with code -


i'm trying put text after input box. doesn't seem firing or working. missing here?

<script>   $("#formfield_4").after('<div class="vt">as appears on id.</div>'); </script> 

i have tested using chrome console , works expected. can see code in source of page.

seems working https://jsfiddle.net/tz9yagm4/

<head> <script> $(document).ready(function(){ $("#formfield_4").after('<div class="vt">as appears on id.</div>'); });  </script> </head>  <body> <input id ="formfield_4"/> </body> 

Comments