Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var sections = document.getElementById("content").children;
- var active = 0;
- function changePage(id)
- {
- var next = parseInt(id);
- if (active != next)
- {
- sections[active].style.opacity = "0";
- setTimeout(function()
- {
- sections[active].style.display = "none";
- sections[next].style.display = "block";
- }, 250);
- setTimeout(function()
- {
- sections[next].style.opacity = "1";
- active = next;
- },500);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement