javascript - finding a certain tr by attribute in an array of tr's - Stack Overflow

hi im trying to find a tr inside an array of tr'sthe attribute name is docIdis there anykind of j

hi im trying to find a tr inside an array of tr's the attribute name is docId

is there anykind of jquery selector for this?

i dont want to just iterate throught the array with a for loop and find it myself.

unlesss you will say i have no choice...

thank you

hi im trying to find a tr inside an array of tr's the attribute name is docId

is there anykind of jquery selector for this?

i dont want to just iterate throught the array with a for loop and find it myself.

unlesss you will say i have no choice...

thank you

Share Improve this question edited Aug 18, 2010 at 6:12 Reigel Gallarde 65.3k21 gold badges125 silver badges142 bronze badges asked Aug 18, 2010 at 6:08 Guy SchallerGuy Schaller 4,7104 gold badges33 silver badges55 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

if you already have the array of trs on hand, and you got them through a jquery selector

array.filter('tr[attr=val]')

may be what you need.

$('tr[name=docId]')

That makes usage of the 'Attribute equals` selector. If your're dealing with a jQuery wrappet set, this is probably what you want.

Even, if that selector internally will also iterate over the set.

Ref.: Attribute Equals

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744412733a4572962.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信