jquery if url contains?
<p>I am using the following to create a scroll animation from a link at the top of a blog post to comments at the bottom on my site:</p>

<pre><code>if (location.hash=='#comments') scrollToComments();
</code></pre>

<p>This works fine to scroll to #comments (i.e. the first comment). However, I would also like it to be able to scroll to an individual comment with the following id structure "#comment-%" e.g. "#comment-22".</p>

<p>Is there a way to do this in jquery?</p>
