Note: Be sure to check out the Fast Feed if your are looking for the same content in 3/4ths the time!
What is jQuery?
The jQuery movement is seemingly everywhere, but if you still remain curious what jQuery is, Rick Strahl has an excellent introduction to library here: An Introduction to jQuery.
The jQuery Wikipedia page tells us that jQuery contains the following features:
- DOM element selections using the cross-browser open source selector engine Sizzle, a spin-off out of jQuery project
- DOM traversal and modification (including support for CSS 1-3 and basic XPath)
- CSS manipulation
- Effects and animations
- Utilities - such as browser version and the each function.
Dave’s jQuery Tips for Web Developers
- Learn the selectors -they are crucial!
- Leverage CSS classes instead of element IDs
- Avoids the ClientID issue
- Good for selecting groups, like GridView rows.
- Look for plugins before reinventing the wheel
- Conversely, be sure you need a plugin
- Classic example is using an accordion when slideToggle is all you really needed.
- Similarly, a lot of people don’t realize they can use $.each()
- Don’t be afraid to use fake CSS classes as “flags”
- Blackjack game example: .card.flipped and .card:not(.flipped)
- Use Firebug
- Take advantage Bookmarklets
- jQueryify – inject jQuery into any page, for testing through Firebug
- SelectorGadget – Very helpful for learning selectors interactively
- Minify and Combine your scripts
- Boost Serving Time
Other Resources Mentioned in the Show