Commit a1f8211e by AlasdairSwan

Updated so is submission prevented by JS due to errors it scrolls to the error messages

parent 4c51f873
...@@ -179,6 +179,11 @@ var edx = edx || {}; ...@@ -179,6 +179,11 @@ var edx = edx || {};
$msg.html( html.join('') ); $msg.html( html.join('') );
this.element.show( this.$errors ); this.element.show( this.$errors );
// Scroll to error messages
$('html,body').animate({
scrollTop: this.$errors.offset().top
},'slow');
}, },
submitForm: function( event ) { submitForm: function( event ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment