Hi,
A question about form handling if I may. Consider the following code sample:
- $('input').focus(function() {
- var f = document.form;
- if (f.foo.value && f.oof.value)
- doThis();
- /* jQuery
- if ($('input[name=foo]').val() && $('input[name=oof]').val())
- doThis();
- */
- });
The traditional code IMO is easier to read and type. What is considered good practice in such cases?
Thanks,
Roy