title: Jquery textfield make my fuction activated after I input in the jquery field - how to call a function in jquery
body: <p>html and javascript. I would like to ask for advice I am trying to implement a function in my jquery textfield however its not working. the code I am using works perfectly if I am creating a textfield in html but its not working if I use my jquery textfield</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  
  Enter your name: &lt;input type="text" id="fname" onblur="myFunction()"&gt;
  
  &lt;p&gt;When you leave the input field, a function is triggered which transforms the input text to upper case.&lt;/p&gt;
  
  &lt;script&gt;
  function myFunction() {
      var x = document.getElementById("fname");
      x.value = x.value.toUpperCase();
  }
  &lt;/script&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>this is my code when I apply jquery try is the id of my textfield jquery</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  
          &lt;script type="text/javascript"&gt;
  
      $("#try").on( function () {
     myFunction();
  });
  function myFunction() {
    var x = document.getElementById("try").value;
                      document.getElementById("try").value = "hi" + x ;
  
  }
          &lt;/script&gt;
  
  
  
  
  &lt;/html&gt;
  </code></pre>