Code optimization for jQuery form field