开发者

jQuery selector for next unfocused input

开发者 https://www.devze.com 2023-04-02 09:25 出处:网络
I have an input element 开发者_运维百科$myInput = $(\'#someInput\') within a paragraph. I would like to find the next input element in that paragraph which is unfocused.

I have an input element 开发者_运维百科$myInput = $('#someInput') within a paragraph. I would like to find the next input element in that paragraph which is unfocused.

I have tried $myInput.next('input(:not(:focus))') but this doesn't seem to work.


$myInput = $('input');

and then

$myInput.nextAll('input').not(':focus').eq(0);


$myInput.nextAll('input').not(':focus').first();

0

精彩评论

暂无评论...
验证码 换一张
取 消