1. Home
  2. Computing & Technology
  3. JavaScript

Animation

One thing that you can use JavaScript for is to animate your web page. This series of tutorials takes you from simple animation such as making something appear or disappear through to moving something around the page however you want.

Some Complete Animations

Stephen's JavaScript Blog

Analog Clocks

Saturday March 13, 2010
Old JavaScripts never die, they just get rewritten. In between writing new scripts and tutorials, I occasionally revisit old scripts and look into what needs to be done to update them. Some time after first writing them I revisited both my original analog clock script and also the more recently written multi-clock version to see what needed to be done to modernise them. In the case of the multi-clock version it already has most of the code enclosed within objects to minimise interference from other scripts and completely unobtrusive and so I made just a few minor tweaks to the code to make it slightly shorter without changing the way it works at all. The original script underwent somewhat bigger changes as I reworked the code based on some of what is in the multi-clock version to remove the need for the body script and to make it unobtrusive. There is no point in my also amending it to enclose the code in an object because that would just make it the same as the multi-clock version. If you write your own scripts you will need to revisit them occasionally to bring the code more up to date. The biggest problem when you have lots of scripts is to prioritise which ones to update first.

Analog Clocks

Bubbles

Friday March 12, 2010
JavaScript can enhance a theme web site. Is the subject of your site something to do with the sea or water? Give your visitors a sense of actually being there. This JavaScript gives your web page an underwater feel with bubbles slowly making their way up the page.

Bubbles

Enhanced Suckerfish Menu

Thursday March 11, 2010
The best menus are still functional when JavaScript is disabled. The suckerfish dropdown menu was the name given to the first dropdown menu for web pages designed using just HTML and CSS with no JavaScript required (except to handle some CSS support that is missing from Internet Explorer). In my version of this menu I have also added some further JavaScript that will enhance the functionality of the menu without stopping the menu from still being usable when JavaScript is disabled.

Enhanced Suckerfish Menu

Arrays

Wednesday March 10, 2010
You don't need to define separate fields for similar items in JavaScript, you can make them an array instead. Arrays are the most commonly used of the types of object built into JavaScript. In this twelfth tutorial on "Modern JavaScript" we look at the difference between Objects and Arrays.

Arrays
Discuss
Readers Respond
Ways I Have Seen JavaScript Misused And How I Would Have Done it Differently
Add Your Response

Recent Blog Posts
Explore JavaScript
About.com Special Features

Reader's Choice Award Winners

What are the best instant messengers, apps, editors and more? You told us, for our 2010 technology awards program. More >

iPad Central

Is Apple's new tablet computer impractical, a must-have -- or both? We'll help you figure it out. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2010 About.com, a part of The New York Times Company.

All rights reserved.