I'm currently building a dynamic website based on jQuery en hashChanged. Currently I use this code on document.ready:
$(window).hashchange( function(){
switch(location.hash)
{
case "#/calendar":
content.load("calendar.php");
break;
case "#/media":
content.load("media.php");
break;
case "#/social":
content.load("social.php");
break;
case "#/settings":
content.load("settings.php");
break;
default:
content.load("home.php");
title.text("Debafla");
}
});
Now I'm building a video galery, so i wanted to use URLs like these:
example.com/#/video/12485
So video.php need to be loaded in the content div en i need to get the video with ID 12485 from the DB. But how can I cover these hash pages in javascript?
Thank you!