| |

Fading Pages in Javascript

Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don't hold it against me. One of the perils of having a 20+ year old website!

I am not a huge proponent of Javascript. However, I recognize that it is becoming more and more powerful and used, especially since AJAX has become more popular. With a new redesign of one of my sites, I wanted to do something different and cool- so I looked to 24 Ways. There I found a nice tutorial on using the effects from Script.aculo.us. Using that tutorial and some extra programming, I was able to create fading “pages”, which are actually divs we fade in and out.

First of all, you must follow the 24 Ways tutorial. I have made all of the javascript from that tutorial available in this post, and then my modified combo.js. All of my changes occur in that. Once you read that 24 Ways Tutorial, come back here.

So by now, you are familiar with all of the files, and the main functions provided in the combo.js. I took combo.js and modified it a little here:

JS Code

Notice I added a few lines at the top of the function. On top of that I added this to my main page:

JS Small

These codes create and check cookies, which is what I used to check what “pages” were open. When a page is open (when the page is first loaded, it is welcome), a cookie created with the name of that page. When a new page is clicked on, my code checks the cookie to see what is currently open, then closes it. After that, the cookie is rewritten with the new page open. The cookie functions are included in my combo.js. When it is all said and done, we have this. Later!

Similar Posts

  • |

    How to Learn a New Programming Language

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website! As I said in the last two posts, Google I/O was truly inspiring. It got me to thinking about how…

  • | |

    Manifest Development Redesign 2011: The Portfolio

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website! For the second part of this series, I want to talk about putting my new portfolio together. The portfolio is…

  • Coding at a new level

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website!This semester I am taking a class called Machine Organization and Assembly Language. What this amounts to is learning how to…

  • | |

    JLC Web Design

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website! Over the last 6 months I have been designing a redesigning the website for my web design company, JLC Web…

  • |

    New Design!

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website!I’ve decided to launch the new design, even though the pages arent all working. I will keep you posted on that,…

  • | |

    Directory Handler at Theme Forest

    Note: This article was published while I was in my early 20s. I was much younger and dumber. Please don’t hold it against me. One of the perils of having a 20+ year old website!I’m happy to announce my first Theme Forest component, Directory Handler. it’s a simple set of 2 classes that handle (in…