jQuery One-Liners and Reuseable Code Snippets for Common Tasks

For the last few weeks I've been collecting tiny morsels of jQuery and straight JavaScript that I've needed for building sites. I had found myself needing the same small scripts over and over. Rather than rewriting and checking an API/plugin reference, now I can just copy from this list. Most of these snippets are a few lines each. Some are simple. Some aren't.

Expandable Maximum List Items jQuery Plugin: Hide after X number of bullet points

This jQuery script will automatically hide all excess list items past a maximum number. It then dynamically adds an expand/collapse link that uses the slideToggle effect. Each list item is collapsed in succession to give the appearance of using slideToggle on a container. The max number, speed of animation, and expand/collapse HTML can be passed as options.