title: How can I check if an element has a string after the hash sign in an id?
body: <p>What I'm trying to check is if an ID of an element has more than just the hash sign <code>#</code>.</p>
  
  <p>I get a value back from a cms that I can't control, and if a user has not inputted a value I get the following in the js file:</p>
  
  <pre><code>$('#').click(function(){
     ...
  });
  </code></pre>
  
  <p>as opposed to when they provide a value like so:</p>
  
  <pre><code>$('#cust_input').click(function(){
     ...
  });
  </code></pre>
  
  <p>What I'd like to do is check if there is something after the <code>#</code>, and only if there is will the click event be allowed. Otherwise at runtime I get the first code block above where I have a click event that's tied to <code>#</code>, which could cause problems elsewhere on the page.</p>