var $form = $('form'), origForm = $form.serialize(); $('form :input').on('change input', function() { $('.change-message').toggle($form.serialize() !== origForm); });