0

I use Angular, Bootstrap and "Start bootstrap template". I have the top menu bar and form on the page. When i try to submit form with invalid field, the framework scrolls to have the field on the top of the page. Unfortunately this is hiden by the menubar. Is there some easy way to customize scrolling and add some offset. In my case I want to have the field 50px below the top of the page.

I found jquery code

me.registrationForm.validate({
    invalidHandler : function(event, validator) {
        $('html, body').animate({
            scrollTop: compute.where.to.scroll 
        }, 2000);
    }
});

but form object I get in controller does not have validate()

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.