title: Element names as constants jquery
body: <p>Just wondering if anyone has any best practices for naming of jquery elements used in events. e.g elements as constant variables declared at the top, vs inline. </p>
  
  <p>My question for this, is I have a very Jquery heavy client side application and only using server side for data handling and auth. </p>
  
  <p>With this, seeing lines like below drives me a little mad: </p>
  
  <pre><code>$("#examplea").hide();
  $("#exampleb").fadeIn(300);
  </code></pre>
  
  <p>Does anyone use any separation such as:</p>
  
  <pre><code>var examplea = "#examplea";
  var exampleb = "#exampleb";
  
  $(examplea).hide();
  $(exampleb).fadeIn(300);
  </code></pre>
  
  <p>I see this looking cleaner in some way, and also means having one place to change code if an element name changed down the track and was used in multiple locations. </p>
  
  <p>I guess this only would become an issue for very large javascript heavy sites, so just throwing out the question on what other people have done to deal with this?</p>
  
  <p>Thanks,</p>