Reputation: 15269
I'm using this:
$(this).closest('tr').next()
To select a table row
, but I also need 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?
Upvotes: 0
Views: 496
Reputation: 3798
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 $()
Upvotes: 1