Best way to find “next” form input element in jQuery?

前端 未结 12 1623
滥情空心
滥情空心 2020-12-02 18:18

Using jQuery, what\'s the best way to find the next form element on the page, starting from an arbitrary element? When I say form element I mean ,

12条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-02 18:59

    This worked well for me, and it correctly skips over hidden inputs:

    input_el.nextAll( 'input:visible:first' ).focus();
    

提交回复
热议问题