tags:

views:

20

answers:

1

when i put www.test.com#view_comments in the url i want to so show a div not by clicking anything just by entering it into the url bar.

can anyone help?

+1  A: 

This will only work when the page first loads:

$(document).ready(function() {
  if(window.location.hash == '#view_comments') {
    $('.comments').show();
  }
});
Brian McKenna