Thanks! I think that gets me started in the right direction. However, I am still having some issues. Here is what I have so far:
var current = (document.location.toString().split('#')[1]) if (current = "1") {document.write( "<h2>Title 1</h2><br /><p>Body text.</p>" ); } else if (current = "2") {document.write( "<h2>Title 2</h2><p>Body text.</p>" ); } else if (current = "3") {document.write( "<h2>Title 3</h2><p>Body text.</p>" ); } else if (current = "4") {document.write( "<h2>Title 4</h2><p>Body text.</p>" ); } else if (current = "5") {document.write( "<h2>Title 5</h2><p>Body text.</p>" ); } else {document.write( "<h2>Title 1</h2><br / ><p>Body text.</p>" ); } I the if/else statement doesn't seem to be working. Also, it only reads the current hash on a manual refresh of the page. Here is the link if helps any: http://www.mitchmckenzie.com/index.php Any further help would be greatly appreciated. On Jul 8, 8:00 am, noon <[EMAIL PROTECTED]> wrote: > alert(document.location.toString().split('#')[1]) will get you the > hash. From there an if statement or a switch/case would serve you. > > On Jul 8, 8:54 am, mitchel <[EMAIL PROTECTED]> wrote: > > > Hello. > > > Admittedly, I know very little about jQuery or javascript in general > > but it seems like it should be able to do what I need it to do fairly > > easily. > > > I am trying to create a div on a page which would display different > > content based on the hash in the url. Is there a way to create several > > hidden divs on a page with the content I want and have a class that > > makes one visible based on the current hash in the URL? Any ideas on > > how would I do this? > > > Thanks.