For those who don't know, an example of a fragment identifier commonly used in a WordPress context is a link to a particular comment - wordpress/?p=34#comment-11.
The theme I am developing hides comments when you first view a post and allows you to view them using a custom content slider. When someone links to a comment however, because the comments are hidden, it won't scroll to the comment.
How do you detect if there is a fragment identifier in the URL?