dans.blog


The miscellaneous ramblings and thoughts of Dan G. Switzer, II

My Spring <br /> 2007 jQuery Presentation

I wanted to post my presentation files for the demo I'll be giving at Spring <br /> Conference 2007 tomorrow morning. This file contains the Powerpoint Presentation, plus all the example file (plus some that I probably won't have a time to get to!)

I probably went overboard on the examples—I seriously doubt I can get through them all in 60 minutes, but hopefully you'll find the source code commented well enough that even if you don't set through my presentation, you can still follow what's going on.

Download "Down & Dirty with jQuery" Presentation

more…


My jQuery Autocomplete Mod

On a recent project I was working on, I needed an "autocomplete" form field that could do both local data array and AJAX lookups. After doing some searching, I came across Dylan Verheul's jQuery Autcomplete plug-in.

This plug-in did a lot of what I needed, but was still missing some of the functionality I required. So, I just modified the library so it worked the way I needed it to. Here's a list of the changes/enhancements I made:

  • Supports local data array (can now use w/out AJAX).
  • Limit dropdown to XX number of results (good for limiting the results to users)
  • Autofill pre-populates text box as you type
  • New findValue() method can be used to programmatically determine if the value in the box is a valid option. (Useful for verifying the text entered is an existing value option.)
  • Dropdown options now correctly re-position themselves on each display (which means they adjust for changing to the DOM)
  • Dropdown box defaults to the width of the input field its attached to (you can manually specify a larger width as well)
  • Better emulates Windows autocomplete boxes (for example: hitting delete and retyping the same box will now bring back the dropdown menu)
  • Miscellaneous bug fixes

more…