Search code examples
javascriptcordovatelerik-appbuilder

Cordova Center Item On Event


I am building and app in Telerik App Builder, and I am attempting to create functionality so that when a submit button is pressed, the page checks if a certain required field has a valid value, and, if not, scrolls back up to that field and focuses on it.

The difficulty is that I have been unable to find any documentation on how to achieve the scroll and focus event, given a DOM element. How would this best be achieved?

Thanks,


Solution

  • If you're using jQuery the easiest way to handle it is using the focus event: https://api.jquery.com/focus/