Why jquery trigger doesn't work?
<p>This part should trigger click on image when #X is present in browser url... but it never happens....</p>

<pre><code>//
var hash = window.location.hash.slice(1);
if (hash) {
    $("#barely_slide img[data-imgnum='"+ hash +"']").trigger("click");
} else {
    move_slide();
}
</code></pre>

<p>Actuall part that needs to be triggered:</p>

<pre><code>//
$("#barely_slide article img").on("click", function(){
    if ($(this).attr("class") == "focus") {return false;}
    //
        $("#barely_slide article img").removeClass("previous");
        $("#barely_slide article .focus").addClass("previous");
        var image = $(this);
$(".previous").animate({"height":300,"margin-top":0}, "fast");
    $("#barely_slide article .focus").removeClass("focus");
    image.addClass("focus");
    //
        window.location.hash = image.attr("data-imgnum");
    //
    move_slide();
    return false;
});
</code></pre>
