title: Why do I need to use $() ? What is it purpose?
body: <p>I am new to javascript, and I am currently trying to understand a piece of code, though I don't understand the use of <code>$()</code> inside my code. My question might be stupid, and I am sorry if it is the case. </p>
  
  <p>Here's more details : 
  There's an object, named <code>p_Element</code>, which has two properties (target and menu). Then, there's this line :</p>
  
  <pre><code>let l_Element = $(p_Element.target);
  </code></pre>
  
  <p>I tried replacing it by :</p>
  
  <pre><code>let l_Element = p_Element.target;
  </code></pre>
  
  <p>but the script doesn't seem to execute. </p>
  
  <p>So here's my question: What is the difference between these two lines? What does <code>$(p_Element.target)</code> returns? </p>
  
  <p>In case you need more details, here's the piece of code I am trying to understand :</p>
  
  <pre><code>var l_Targets = [
      {target: "#pve",            menu: ".pve"},
      {target: "#tutorial",       menu: ".tutorial"},
      {target: "#donation_home",  menu: ".donation"},
      {target: "#register",       menu: ".register"},
      {target: "#account_top",    menu: ".team"},
      {target: "#races",          menu: ".races"}
  ];
  var l_Infos = {};
  l_Targets.forEach(function(p_Element)
  {
      let l_Element = $(p_Element.target); // Please explain me this line
      if (l_Element.length === 0 || l_Element.length &gt; 1)
          return;
      let l_Top    = parseInt(l_Element.offset().top);
      let l_Bottom = parseInt(l_Element.offset().top + l_Element.height());
      l_Infos[p_Element.target] = {
          top: l_Top,
          bottom: l_Bottom,
          menu: p_Element.menu
      };
  
  });
  </code></pre>
  
  <p>I don't own this script, it comes from here: <a href="https://naicaonline.com/assets/js/home/navbar.js?v=0.08" rel="nofollow noreferrer">https://naicaonline.com/assets/js/home/navbar.js?v=0.08</a></p>