All Levels

Sacrificial Lambda

Dynamically binding event handlers to content that has been ajaxed in with $.load without repeating yourself can be tricky. Lambda functions help you to not repeat yourself as much. jQuery uses lamdba functions everywhere, so if you're familiar with jQuery, you should be familiar with the syntax of lambda functions. In this example, the ajaxed-in […]
Read the rest of this entry »

Introducing $(document).ready()

This is the first thing to learn about jQuery: If you want an event to work on your page, you should call it inside the $(document).ready() function. Everything inside it will load as soon as the DOM is loaded and before the page contents are loaded.
Read the rest of this entry »

A Getting Started Guide

Jörn Zaefferer has put together a nice "Getting Started Guide" that can help people, um, get started wtih jQuery. It'll help anyone who is new to jQuery, and even those who are fairly new to JavaScript and programming in general — just the kind of help I like. Here is what the guide includes: Setup […]
Read the rest of this entry »

Multiple $(document).ready()

One more great thing about $(document).ready() that I didn't mention in my previous post is that you can use it more than once. In fact, if you don't care at all about keeping your code small, you could litter your javascript file with them. It's great to be able to group your functions within a […]
Read the rest of this entry »

Basic Show and Hide

As promised in my last entry, I'll be showing you a simple effect that you can do using jQuery: showing or hiding something, or a group of things, on the page. The two functions that let us do this are, not surprisingly, show() and hide(). jQuery also comes with another function called toggle(), which will […]
Read the rest of this entry »

Slicker Show and Hide

Last time I showed you how to make something appear and disappear on a web page. This time I'll show you how to do it with style. Like we did last time, we'll start with our $(document).ready() and put everything else inside of it. Adjust the Speed This time, however, we're going to adjust the […]
Read the rest of this entry »

Responsive Menu
Add more content here...