title: what does @ do in an elements id tag javascript/php and how can i reference this element
body: <p>Junior dev working on a website and got thrown by how to reference this element</p>
  <pre><code>&lt;div class=&quot;form-group&quot;&gt;
                    &lt;label for=&quot;@id-name&quot;&gt;Name&lt;/label&gt;
                    &lt;input id=&quot;@id-name&quot; class=&quot;form-control&quot; name=&quot;name&quot; required type=&quot;text&quot; max-length=&quot;70&quot; value=&quot;{{$userBot-&gt;name ?? null}}&quot;&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I was adding the maximum length cap and wanted to create an alert when this limit was reached. I was expecting the solution to look something like this</p>
  <pre><code>$( '#@id-name' ).on('input', function() {
                                      if ($(this).val().length&gt;70) {
                                          alert('you have reached the maximum characters for bot name');
                                      }
                                  });
  </code></pre>
  <p>but, not entirely to my surprise, this doesn't seem to be able to get the element to reference, and I tried some variations between jquery and javascript and different &quot;&quot; positionings to no success. I know the site uses php, my assumption is this is a part of that language (php isn't my area of expertise, my role is mostly ux integrations like this alert)</p>
  <p>I'm curious how more experienced developers would create a reference to an element with an @ in the id.</p>