title: checking if location.hash exists
body: <p>I have a carousel that I can change the location of with an integer value.
  <br>What I'd like to do is take the hash, remove the <code>#</code> symbol and store that value in a variable which I can later use in a function.</p>
  
  <p>I've pasted the code below, which for some reason just won't work.</p>
  
  <pre><code>var $hash = window.location.hash;
  
          if($hash != ''){
              var $grave_nr = $hash.substring(1);
              return $grave_nr;
          } else{
              var $grave_nr = 1;
              return $grave_nr;
          }
  
          // carousel
          $('#the_graves_carousel').tinycarousel({ 
              intervaltime: 7000,
              pager: true,
              duration: 1600,
              start: $grave_nr
          });  
  </code></pre>
  
  <p>Anyone have an idea why it's not working?</p>
  
  <p><br><strong>EDIT:</strong> fixed it by removing the <code>return $grave_nr;</code> in the if statements :)</p>