Access our premium support and let us know your problems, we will help you solve them.

0
No products in the cart.

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts
  • in reply to: Scroll to an element with jQuery #9764
    blankbenjamin-oakes
    Participant

    If you are only handling scrolling to an input element, you can use focus(). For example, if you wanted to scroll to the first visible input:

    $(':input:visible').first().focus();
    

    Or the first visible input in an container with class .error:

    $('.error :input:visible').first().focus();
    

    Thanks to Tricia Ball for pointing this out!

Viewing 1 post (of 1 total)