Many months ago, I posted a note to the jQuery discussion list showing a script I wrote that uses the Interface plugin's ScrollTo() method to automatically scroll smoothly to any id or named anchor on the current page when clicking on a same-page link. The code was unwieldy and unneccessarily long, but it worked.
A question I often hear is, "How do I clear a form?" Initially the answer seems very straightforward - a one-liner in jQuery: $('form :input').val(""); But upon closer examination we find that this is a bad way to solve the problem. When someone says they want to "clear a form" what they really mean is […]
One of the most confusing aspects of jQuery is how it assigns scope during callbacks. It must be confusing because the topic generates a lot of questions on the mailing list. It's too bad, really, because jQuery sets the scope in order to simplify your code, not make it more confusing. So here are some […]