Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //page
- var domain = "http://localhost/new/";;
- var home = "#home";
- var activities = "#activities";
- var about = "#about";
- var information = "#information";
- var contact = "#contact";
- var up = document.getElementById("up");
- var dn = document.getElementById("dn");
- //home page
- up.onclick = function()
- {
- if(document.URL == domain + home || document.URL == domain) { }
- else if(document.URL == domain + activities ) { window.location = domain + about; alert(); }
- else if(document.URL == domain + about ) { window.location = domain + information; alert(); }
- else if(document.URL == domain + information ) { window.location = domain + contact; alert(); }
- else if(document.URL == domain + contact ) { window.location = domain + about; alert(); }
- else {}
- }
- dn.onclick = function()
- {
- if(document.URL == domain + home ) { window.location = domain + activities; alert(); }
- else if(document.URL == domain + activities ) { window.location = domain + about; alert(); }
- else if(document.URL == domain + about ) { window.location = domain + information; alert(); }
- else if(document.URL == domain + information ) { window.location = domain + contact;alert(); }
- else if(document.URL == domain + contact ) { window.location = domain + contact; alert(); }
- else {}
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement