This is part 2 of the “jQuery From Scratch” series of tutorials. If you have not read part 1, you can have a quick read. This tutorial will deal with writing and executing functions in JavaScript. jQuery does not provide a quick method for creating functions. That’s because it doesn’t need to. So what are functions? Instead of giving you the standard definition, I’ll explain why/when you might want to create and use functions in your code. Of course, I’ll also explain how to write and execute functions.
Unordered lists have a number of useful applications. They are commonly used to structure a site’s navigation. I have found, in a number of web applications, that the ability to reorder (sort) such lists would be extremely useful. So, how can this be achieved?
Sortable Widgets is a plugin for Woardpress. When activated, this simple plugin allows visitors to change the order of those widgets displayed in your blog’s sidebar. As this plugin has a number of configurable options, you should be able to use Sortable Widgets with almost any Wordpress theme. Furthermore, each visitor’s preferences are remembered through the use of a single cookie.
I recently stumbled upon Dragon Interactive (dragoninteractive.com). It’s a pretty well designed site. However, the pièce de résistance is their rather cool animated menu. Now… had this been designed in Adobe Flash, I wouldn’t had paid much attention. A closer inspection revealed that the menu is plain XHTML, CSS and Javascript. This detailed tutorial will walk you through coding an animated menu, using the same principals as Dragon Interactive. Furthermore, just 13 lines of javascript are required.
