title: jQuery on submit doesn't work
body: <p>I know the kind of question is already been asked but I can't find a solution to my problem. In my HTML file I have this code:</p>
  
  <pre><code>&lt;div&gt;
          &lt;form id="chart-input"&gt;
              &lt;input type="text" name="country" placeholder="Country" autocomplete="off"&gt;
              &lt;input type="number" name="visits" placeholder="Visits" autocomplete="off"&gt; 
              &lt;button&gt;Send&lt;/button&gt;
          &lt;/form&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried to handle the submit for this form with jQuery, but it seems it doesn't work.</p>
  
  <p>Here is my js file:</p>
  
  <pre><code>jQuery('#chart-input').on('submit', function (e) {
    e.preventDefault();
  
    let countryTextbox = jQuery('[name=country]');
    let visitsTextbox = jQuery('[name=visits]');
  
  
      socket.emit('addData', {
        "country": countryTextbox,
        "visits": visitsTextbox
      }); 
  });
  </code></pre>
  
  <p>What's the problem? When I click the button <code>preventDefault()</code> and the other code is not executed. Hope anyone knows a solution. Thx</p>