Minor Changes

I am slowly making minor changes throughout the site, one step at a time. The idea is to get into the habit of updating and playing with the site, little by little, rather than completely overhauling the site, only to abandon it again a few weeks later. (This is also why I have not created another blog design, although that may happen anyway.)

In any case, I’m sure you’re curious as to what minor change I’ve made today. Well, if you look on the blog home page at the leftmost of three near the bottom of the page, you’ll see a section titled “Blogmarks.” These are powered by del.icio.us (and a Wordpress plugin). I wanted to make the descriptions that I saved with my del.icio.us links to be available for those interested, but I didn’t want it to ruin my web page’s design. If the descriptions were displayed by default, it would create imbalance, lack of consistency and structure, and just look terrible.

My solution, of course, was JavaScript. A Show Descriptions/Hide Descriptions link appears only for JavaScript users, and a program automatically hides the descriptions when the page loads (so users without JavaScript will just get the less-amazing version of my design, with the descriptions showing by default).

The solution worked quite well. My JavaScript is powered by the moo.fx library (along with a lighter version of the Protoype library) because it is lightweight and relatively fast. However, Firefox has always had kind of its own hangup with the script, so the visual effect produced wasn’t as smooth as I wanted. I found that this was partially due to the fact that I was running the visual effects on multiple elements (ten of them) simultaneously. What I decided to do today was modify the script to apply the visual effects to one element at a time, creating a quasi-staircase effect rather than a slinky effect. Head on over to the blog home page and try it out for yourself. The effect you see is the change that I made. It’s optimized for speed and looks pretty sweet.

If you’re interested in the code, feel free to snoop around the source. The HTML that is output was generated by PHP, with the exception of the show/hide link that is output by JavaScript. There are LINK tags to the JavaScript files (the libraries and my separate script) so you can see what the code looks like. (The commented part in my script is what I removed, and two lines below the commented area is what I added, plus the function showDelinks() and some global variables for said function.)

Anyway, I’m proud of the fact that I’m making changes. Small, yes, but I am working progressively, and that’s a critical step at this point. And besides, it’s a pretty nifty script, if I do say so myself. =)

Newsvine | Del.icio.us | Digg
In Site News, JavaScript on June 12th, 2008 | No Remarks

Leave a Remark

 

Note: HTML is allowed. (<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> ).