title: define specific url for specific fancybox gallery
body: <p>I have the same issue encountered by many others, but it seems there was no definitive answer, so I'm sorry if this counts as a double post.</p>
  
  <p>My site <a href="http://brava-studio.com" rel="nofollow noreferrer">http://brava-studio.com</a> works with fancybox galleries. Originally, a user could only click a button to open a gallery. I also want to have specific urls that directs the user to a specific gallery. I made a temporary solution in which <a href="http://brava-studio.com/#EarthHouse" rel="nofollow noreferrer">http://brava-studio.com/#EarthHouse</a> directs to the 'Earth House' project gallery for example. Sadly, because of my bad code, everything that follows the <code>#</code> will direct to the same gallery. </p>
  
  <p>my code below:</p>
  
  <pre><code>var thisHash = window.location.hash;
  $(document).ready(function () {
      if (window.location.hash) {
          $("#fancybox-earth-g").trigger('click');
      }
  });
  </code></pre>
  
  <p>combined from <a href="http://fancybox.net/blog" rel="nofollow noreferrer">Fancybox blog</a> => 6). Start FancyBox on page load :</p>
  
  <pre><code>jQuery(document).ready(function() {
      $("#your_selector").trigger('click');
  });
  </code></pre>
  
  <p>and from <a href="https://stackoverflow.com/questions/9028310/how-to-create-a-direct-link-to-any-fancybox-box">How to create a direct link to any fancybox box</a></p>
  
  <pre><code>var thisHash = window.location.hash;
  $(document).ready(function () {
      if (window.location.hash) {
          $(thisHash).fancybox({
              padding: 0
              // more API options
          }).trigger('click');
      }
      $('.fancylink').fancybox({
          padding: 0
          // more API options
      });
  }); // ready
  </code></pre>