refactored #submit and #clear buttons to jquery .on