Mohan Ram
Mohan Ram

Reputation: 8463

how to find element with its name in jquery

How to find checkbox with name checkbox[]

$("#a_tag_id").parent('tr.section_quick_edit').find('input:checkbox[name=checkbox[]]').val();

Upvotes: 2

Views: 165

Answers (2)

rcravens
rcravens

Reputation: 8390

$("#a_tag_id").parent('tr.section_quick_edit').find("input:checkbox[name='checkbox[]']").val();

Notice the extra quotes.

Bob

Upvotes: 3

Zach Inglis
Zach Inglis

Reputation: 1257

I think what you are looking for is

$("#a_tag_id").parent('tr.section_quick_edit').find('input:checkbox[name=checkbox[]]').attr('name');

Upvotes: 0

Related Questions