Combining 2 different jquery functions
<p>Am trying to combine two JQuery functions, but without any success.</p>

<pre><code>if (querySt("photoid")) {
  var value = querySt("photoid");
   alert(value);
}
</code></pre>

<p>with</p>

<pre><code>window.onload = function() {
  if(window.location.hash) {
    $(window.location.hash).trigger('click');
  }
};
</code></pre>

<p>Have tried the following:</p>

<pre><code>if (querySt("photoid")) {   
  var value = querySt("photoid");
  window.onload = function() {
    if(window.location.value) {
      $('#' + window.location.value).trigger('click');
    }
  }
};  
</code></pre>

<p>Hash requires to be replaced with the actual '#' symbol.
photoid returns the image id value like 415.</p>

<p>Any suggestion will be much appreciated.</p>

<p>Kind regards,
Charl</p>
