title: Visual Studio Code giving error for all my jquery code after the update
body: <p>I was coding and everything was fine then visual studio code got an update and then it ended up like this and it is the latest update as of the time of posting:
  <a href="https://i.stack.imgur.com/360g0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/360g0.png" alt="enter image description here" /></a></p>
  <p>BTW, I checked the jQuery's file source just to make sure and it was correct.<br/></p>
  <blockquote>
  <p>Ok, @charlietfl sugessted that I should remove <code>$(document).ready(function());</code> it got better but I still end up with this :<br/><a href="https://i.stack.imgur.com/XkCIU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XkCIU.png" alt="enter image description here" /></a>
  <br/></p>
  </blockquote>
  <p>But I thought that using the <code>.ready()</code> was important to make sure that the DOM has loaded fully and then the JavaScript code happen. Are there any alternatives that do the same?</p>
  <h2>Update and fixed</h2>
  <p>after looking at the API documentation of the JQuery I found that <code>.ready()</code> function is deprecated should be called like below but it didn't say that the <code>.click()</code> method is deprecated but it was also fixed using this other way of using it and it was the ESLinter that was giving me a hard time:</p>
  <pre><code>$(function () {
      function addClass() {
          $(&quot;#div1&quot;).addClass(&quot;divStyled&quot;);
      }
      function removeClass() {
          $(&quot;#div1&quot;).removeClass(&quot;divStyled&quot;);
      }
      function toggleClass() {
          $(&quot;#div1&quot;).toggleClass(&quot;divStyled pStyled&quot;);
      }
      function CSS1() {
          var padding = $(&quot;#div1&quot;).css(&quot;padding-left&quot;);
          $(&quot;#p2&quot;).html(padding);
  
      }
  
      $(&quot;#btnClick1&quot;).on(&quot;click&quot;, addClass);
      $(&quot;#btnClick2&quot;).on(&quot;click&quot;, removeClass);
      $(&quot;#btnClick3&quot;).on(&quot;click&quot;, toggleClass);
      $(&quot;#btnClick4&quot;).on(&quot;click&quot;, CSS1);
  });
  </code></pre>