开发者

Getting the closest item with specified ID after tr

I'm using this:

$(this).closest('tr').next()

To select a table row, but I also nee开发者_如何转开发d to select a tr with specified id after this tr.

I've tried like to do it this way:

var a = $(this).closest('tr').next()
var b = $(a).closest('#itemrow').next()

var a is working fine, but it does not select an var b.

What it the problem?


var a = $(this).closest('tr').nextAll('#itemrow:first')


I guess if u do this it will work fine

var a = $(this).closest('tr').next()
var b = a.closest('#itemrow').next()

a is already a jquery object dont surround it with $()

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜