On a base of this question i'd like to ask a question: How can solve the same problem using class selector $('.class')
?
I get Uncaught TypeError: undefined is not a function
When trying to run this
$('html, body').animate({
scrollTop: $('input.ng-invalid').offset().top
}, 2000);