> From: John H > > Michael, this is excellent and very instructive--thanks!
Glad it was helpful, John. > I had to remove the dollar sign from $epc otherwise Firefox > reported "missing variable name". That doesn't sound right - there must have been something else causing that. $epc is a perfectly valid variable name: the $ character is treated exactly like a letter in JavaScript variable names. It's a common (and recommended) convention in jQuery code to use a leading $ on a variable name that contains a reference to a jQuery object, as in this code: var $epc = $('#edit-profile-country'); If you still have a test page showing the error, I'd be curious to see it (either a link or the page source). > I assume by your exclusion that wrapping the whole thing with $ > (document).ready(function() is unnecessary and is only used > when you want to be absolutely sure the document is fully loaded. $(fn) is simply a shorthand for $(document).ready(fn). They do exactly the same thing. -Mike