jQuery Selector to Match Names with Brackets ([])

When you’re creating a form and have checkboxes and/or multi-value selects that take multiple values, in PHP you specify the field name with brackets as in

<input name=”category[]” >

In order to select this element in jQuery, you need to escape the brackets with double slashes as in

$(“[category$='[]’]”)